bloug
Forum Replies Created
-
Forum: Plugins
In reply to: [Dynamic QR Code - generator] Printed code issuesOk, thank you.
Forum: Plugins
In reply to: [Dynamic QR Code - generator] Changing displayed linkOr maybe use an email shortener to generate shorter source link?
Same here. Also with Divi and messed many hours with Divi module.
With the plugin, map appears for 1 second and there’s an api error.
Forum: Plugins
In reply to: [Featured Galleries] Function.php array syntaxHi. Thanks to still be here.I’ve added it to the function like this:
function add_featured_galleries_to_ctp( $post_types ) { array_push($post_types, 'gd_place','gd_online_places'); // ($post_types comes in as array('post','page'). If you don't want FGs on those, you can just return a custom array instead of adding to it. ) return $post_types; var_dump( $post_types ); } add_filter('fg_post_types', 'add_featured_galleries_to_ctp' );You can see the source here but since I don’t know what to look for, I’ve not find anything valuable.
http://www.walago.co/go/places/united-states/illinois/chicago/barber-shops/joes-barber-shop/
Forum: Plugins
In reply to: [Featured Galleries] Function.php array syntaxI’ve been very busy. I’ll give it a shot later today.
Forum: Plugins
In reply to: [Featured Galleries] Function.php array syntaxHi and thanks for your response. I’ve already tried that but I’ve just tried it again just in case and I got the same result.
I must admit my php knowledge is pretty limited. I don’t know how to do an array dump.
Forum: Plugins
In reply to: [Featured Galleries] Function.php array syntaxSure. I don’t know if the proper way to do it but here’s the whole file.
The function is called at line 145 which is usually a function for another gallery used (geodirectory)
Other geodirectory funtions are below that
I’ve inserted the featured gallery function at line 221
———————
<?php require_once 'include/cpt-options.php'; require_once 'include/Tax-meta-class/Tax-meta-class.php'; include 'include/my_shortcodes.php'; add_filter('geodir_breadcrumb','geodir_breadcrumb_remove',10,2); function geodir_breadcrumb_remove($breadcrumb, $separator){ return ''; } /** * Add image size */ add_image_size( 'geo-gallery-custom', 320, 200 ); /** * enqueue the scripts */ function geo_divi_scripts() { wp_enqueue_script( 'masonry-js', get_stylesheet_directory_uri() . '/js/masonry.pkgd.min.js', array('jquery'), '1.0.0', true ); wp_enqueue_script( 'child-js', get_stylesheet_directory_uri() . '/js/script.js', array('jquery'), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'geo_divi_scripts' ); // left categories on gd add_action('geodir_listings_sidebar_left_inside', 'left_gd_sidebar'); function left_gd_sidebar() { // echo "done"; } // remove the select view dropdown remove_action('geodir_before_listing', 'geodir_list_view_select', 100); remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); // add metabox to custom taxonomies if (is_admin()){ $prefix = 'dgeo_'; $config = array( 'id' => 'dgeo_tax_meta_box', // meta box id, unique per meta box 'title' => 'Color', // meta box title 'pages' => array('gd_placecategory', 'gd_blogscategory', 'gd_bandscategory', 'gd_online_placescategory' ), // taxonomy name, accept categories, post_tag and custom taxonomies 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional 'fields' => array(), // list of meta fields (can be added by field arrays) 'local_images' => false, // Use local or hosted images (meta box images for add/remove) 'use_with_theme' => true //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false). ); $dgeo_meta = new Tax_Meta_Class($config); $dgeo_meta->addColor($prefix.'cat_color',array('name'=> __('Color ','tax-meta'))); $dgeo_meta->Finish(); } // single detail page remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); add_action ('geodir_detail_before_main_content', 'geo_single_wide_top', 10); remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); remove_action('geodir_details_main_content', 'geodir_action_details_slider', 30); remove_action('geodir_details_main_content', 'geodir_action_details_taxonomies', 40); remove_action('geodir_details_main_content', 'geodir_action_details_next_prev', 80); remove_action('geodir_details_main_content', 'geodir_show_detail_page_tabs', 60); add_action('geodir_details_main_content', 'geo_tab_content', 60); // single details sidebar remove_action('geodir_detail_sidebar_inside', 'geodir_details_sidebar_place_details', 10); remove_action('geodir_detail_sidebar_inside', 'geodir_details_sidebar_widget_area', 20); add_action('geodir_detail_sidebar_inside', 'geo_details_sidebar', 10); function geo_single_wide_top() { global $post; $thumb_id = get_post_thumbnail_id(); $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'full', true); if ( isset($thumb_url_array[0]) ) { $thumb_url = 'style="background-image: url(' .$thumb_url_array[0].');"'; } else { $thumb_url = ''; } // $post_details = geodir_get_post_info($post->ID); ob_start(); // print_r( $post_details ); ?> <div class="single-header-image cleearfix" <?php echo $thumb_url; ?>> <div class="single-header-content"> <h1><?php the_title(); ?></h1> <div><?php echo geodir_get_post_meta($post->ID,'geodir_geo_description',true); ?></div> </div> <div class="dir-tab-menu"><?php geo_tab_menu(); ?></div> </div> <?php echo ob_get_clean(); } function geo_tab_menu() { global $post; $vars = array( 'geodir_geo_products' => 'products', 'geodir_geo_services' => 'services', 'geodir_geo_specials' => 'specials', 'geodir_sitemap' => 'sitemap' ); ?> <span class="active" href="#profile">Profile</span> <span href="#map">Map</span> <?php foreach ($vars as $var => $id) { if ( geodir_get_post_meta( $post->ID, $var, true ) ) : ?> <span href="#<?php echo $id ?>"><?php echo $id; ?></span> <?php endif; } } function geo_tab_content() { global $post; $vars = array( 'geodir_geo_products' => 'products', 'geodir_geo_services' => 'services', 'geodir_geo_specials' => 'specials', 'geodir_sitemap' => 'sitemap', 'geodir_post_latitude' => 'map' ); ?> <div id="profile" class="dir-tab-content active"><?php the_content(); ?></div> <div id="map" class="dir-tab-content"><?php geo_map_display(); ?></div> <?php foreach ($vars as $var => $id) { if ( $temp = geodir_get_post_meta( $post->ID, $var, true ) ) : ?> <div id="<?php echo $id ?>" class="dir-tab-content"><?php echo $temp; ?></div> <?php endif; } geo_details_video(); add_featured_galleries_to_ctp(); } function geo_map_display() { global $post, $post_images, $video, $special_offers, $related_listing, $geodir_post_detail_fields; $map_args = array(); $map_args['map_canvas_name'] = 'detail_page_map_canvas'; $map_args['width'] = '600'; $map_args['height'] = '300'; if ($post->post_mapzoom) { $map_args['zoom'] = '' . $post->post_mapzoom . ''; } $map_args['autozoom'] = false; $map_args['child_collapse'] = '0'; $map_args['enable_cat_filters'] = false; $map_args['enable_text_search'] = false; $map_args['enable_post_type_filters'] = false; $map_args['enable_location_filters'] = false; $map_args['enable_jason_on_load'] = true; $map_args['enable_map_direction'] = true; $map_args['map_class_name'] = 'geodir-map-detail-page'; geodir_draw_map($map_args); } function geo_details_sidebar() { global $post; ?> <h3><?php the_title(); ?></h3> <div class="sidebar-address sidebar-item clearfix"> <i class="fa fa-globe"></i> <?php echo $post->post_address; ?>, <?php echo $post->post_city . ' ' . $post->post_state . ' ' . $post->post_zip; ?> </div> <?php if ( $temp = geodir_get_post_meta( $post->ID, 'geodir_contact', true ) ) : ?> <div class="sidebar-phone sidebar-item clearfix"> <i class="fa fa-mobile"></i> <a href="tel:<?php echo $temp; ?>"><?php echo $temp; ?></a> </div> <?php endif; ?> <?php if ( $temp = geodir_get_post_meta( $post->ID, 'geodir_email', true ) ) : ?> <div class="sidebar-email sidebar-item clearfix"> <i class="fa fa-envelope-o"></i> <a href="mailto:<?php echo $temp; ?>"><?php echo $temp; ?></a> </div> <?php endif; ?> <?php if ( $temp = geodir_get_post_meta( $post->ID, 'geodir_timing', true ) ) : ?> <div class="sidebar-time sidebar-item clearfix"> <i class="fa fa-clock-o"></i> <?php echo $temp; ?> </div> <?php endif; ?> <?php if ( $temp = geodir_get_post_meta( $post->ID, 'geodir_website', true ) ) : ?> <div class="sidebar-website sidebar-item clearfix"> <i class="fa fa-external-link"></i> <a target="_blank" href="<?php echo $temp; ?>"><?php echo str_replace(array('www.', 'http://', 'https://'), '', $temp); ?></a> </div> <?php endif; ?> <?php get_card_social($post->ID); ?> <?php } function add_featured_galleries_to_ctp( $post_types ) { array_push($post_types, array('gd_place','gd_bands')); // ($post_types comes in as array('post','page'). If you don't want FGs on those, you can just return a custom array instead of adding to it. ) return $post_types; } add_filter('fg_post_types', 'add_featured_galleries_to_ctp' ); function geo_details_gallery() { global $post; $post_images = geodir_get_images($post->ID, 'full', get_option('geodir_listing_no_img')); $thumbnail_id = get_post_thumbnail_id( $post->id ); if (!empty($post_images)) { echo '<div class="geo-gallery">'; foreach ($post_images as $image) { // echo $image->src; if ( $image->id != $thumbnail_id ) : ?> <a href="<?php echo $image->src; ?>" rel="lightbox"> <img src="<?php echo $image->src; ?>"> </a> <?php endif; } echo '</div>'; }// endfore } function geo_details_video() { global $post; // $video = echo '<div class="details-embed-video">'. wp_oembed_get( geodir_get_video( $post->ID ) ) . '</div>'; } //random add_action('init','fivera_explore_button'); function fivera_explore_button() { global $wp; $wp->add_query_var('random'); add_rewrite_rule('random/?$', 'index.php?random=1', 'top'); } add_action('template_redirect','random_template'); function random_template() { if (get_query_var('random') == 1) { $posts = get_posts(array( 'post_type' => array('gd_place', 'gd_online_places'), 'orderby' => 'rand', 'numberposts' => '1' )); foreach($posts as $post) { $link = get_permalink($post); } wp_redirect($link,307); exit; } }Forum: Plugins
In reply to: [Featured Galleries] Function.php array syntaxGreat! Thanks
Forum: Plugins
In reply to: [Firelight Lightbox] Youtube Full screen not allowedHI. Thanks for your response. Unfortunately, it’s not working. With the dev version, when I click on the image, the lightbox opens with a grey shade all over and if I click on the lightbox, it just closes and back to normal page view.
You can see a screenshot here:
http://www.topnotchtremblant.com/img/grey_screenshot.jpgAnd the normal version (with no fullscreen)
http://www.topnotchtremblant.com/en/haut-versant-north-side/
Click on the image above “Bean me down scotty” on the left.
Same problem here. Any solutions?
RESOLVED!
It was theme accent color settings!
Elegant Themes divi theme.
Forum: Localhost Installs
In reply to: Javascript redirect and seoNo, on a shared server.