Forum Replies Created

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
  • in reply to: Ajax Search Result #109146
     rikbutterflyskull
    Participant

    It’s not a plugin problem or a bug, is only a bunch of results in no-scrolling search container ๐Ÿ™‚

    COPY CODE
    .kleo_ajax_results {
    	min-height: 88px;
    	height: auto;
    	max-height: 400px;
    	overflow-y: scroll;
    	overflow-x: hidden;
    }

    With this i fix my problem hoping to be useful to someone else. I just have to write media queries for other resolutions. Thnaks

    in reply to: Ajax Search Result #109012
     rikbutterflyskull
    Participant

    UPDATE
    With the first code the height was always 500px, even if there wasn’t results.
    This works better with heights.

    COPY CODE
    .kleo_ajax_results {
    	min-height: 100px;
    	height: auto;
    	max-height: 400px;
    	overflow: scroll;
    }

    This situation is related in have more similar results in many post types, for example GeoDirectory places like Pub or Restaurants, tour pages and blog. is hard it happens in normal usage.

    I’ll test in various screens later this week.

    Bye

    in reply to: Ajax Search Result #108938
     rikbutterflyskull
    Participant

    This works

    COPY CODE
    #ajax_search_container {
       overflow: scroll;
       height: 100%;
       min-height: 500px;
    }

    Declaring 500px as min-height is not good for different resolution ( i’m using 1280×800). I should write every media-query for different screens.

    I not tested the mobile layout yet.

    in reply to: Footer Columns #108934
     rikbutterflyskull
    Participant

    Don’t use that method, it’s better not touch the core files.

    Try to put this in your Quick CSS:

    COPY CODE
    #footer-sidebar-4 {display: none!important;}
    #footer .col-sm-3 {width: 33%!important;}
    @media (min-width: 320px) and (max-width: 767px) {#footer .col-sm-3 {width: 100%!important;}}
    in reply to: Full width elements above page headers? #108862
     rikbutterflyskull
    Participant

    You can use the Header Content metabox at bottom of page edit. Put your shortcode or html content there. For shorcodes you can build your content with Visual Composer (VC) in page edit, switch to Classic Mode, copy and paste the raw text, or use exiting shortcodes.

    For page without editing permission like BuddyPress Page you must use a php function. I write for me three functions:

    COPY CODE
    add_action('kleo_before_content','add_bpgroup_head');
    function add_bpgroup_head() {
        if (is_page( 61 )) {
            echo do_shortcode('[shortcode]');
        }
    }
    add_action('kleo_before_content','add_bpactivity_head');
    function add_bpactivity_head() {
        if (is_page( 6 )) {
            echo do_shortcode('[shortcode]');
        }
    }
    add_action('kleo_before_content','add_bpmember_head');
    function add_bpmember_head() {
        if (is_page( 7 )) {
            echo do_shortcode('[shortcode]');
        }
    }

    where 61,6,7 are the Group, Activity and Members page ID, created by BuddyPress. Set your ids. Replace [shorcode] with your shortcode like rev slider shortcode, VC single image. These functions accept only simple shortcodes, not an entire VC page. (example 01 screenshot, a single image in header)

    To set a full row with content like entire page structure you must use:

    COPY CODE
    add_action('kleo_before_content','bp_custom_content_header');
     function bp_custom_content_header() {
    
      $pageid = 1024; //Page ID
      
      $id_page = get_post($pageid);
      
      $content = $id_page->post_content;
      $content = apply_filters('the_content', $content);
      $content = str_replace(']]>', ']]>', $content);
    
        if (is_page( 61 )) {
          echo $content;
        }
    }

    where $pageid is the page to show and 61 is still my members page ID (example 02a/b screenshot).

    in reply to: Title Issues While Using WordPress SEO by Yoast #107752
     rikbutterflyskull
    Participant

    i fixed the previous snippet for the double title:

    COPY CODE
    // Fix wpseo title
    add_filter('wpseo_title', 'buddypress_wpseo_title');
    function buddypress_wpseo_title($title) {
        $wpseo = WPSEO_Frontend::get_instance();
        $separator = $wpseo->options['separator'];
    
        $separator_options = array(
            'sc-dash' => '-',
            'sc-ndash' => 'โ€“',
            'sc-mdash' => 'โ€”',
            'sc-middot' => 'ยท',
            'sc-bull' => 'โ€ข',
            'sc-star' => '*',
            'sc-smstar' => 'โ‹†',
            'sc-pipe' => '|',
            'sc-tilde' => '~',
            'sc-laquo' => 'ยซ',
            'sc-raquo' => 'ยป',
            'sc-lt' => '< ',
            'sc-gt' => '>',
        );
    
        if (array_key_exists($separator, $separator_options)) {
            $separator = $separator_options[$separator];
        }
        $bp = buddypress();
        if (bp_is_user()) {
            return bp_get_displayed_user_fullname() . ' ' . $separator . ' ' . get_bloginfo();
        } elseif (bp_is_group()) {
            return bp_get_current_group_name() . ' ' . $separator . ' ' . get_bloginfo();
        }
        return $title;
    }

    Yoast SEO has know problems with buddypress.
    Another trick: https://bp-tricks.com/coding/making-buddypress-compatible-with-the-wordpress-seo-plugin-from-yoast/

    in reply to: GeoDirectory search #107247
     rikbutterflyskull
    Participant

    Kleo supports the main GeoDirectory Core plugin, not the addons like Events/Custom Post Type or Advance Search. In the basic search shortcode there isn’t the cpt/events selector.

    You should customize the entire search bar with CSS ( new width % for media queries) if you activated CPT/Events addon.

    Try this in style.css

    COPY CODE
    @media (min-width: 1200px) {
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.search_text,
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.snear {
    	  width: 29%;
        }
        .geodir-search .search_by_post, 
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.geodir_submit_search {
    	  width: 20%;
        }
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search {
    	  padding: 10px;
        }
    }
    @media (min-width: 992px) and (max-width: 1199px) {
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.search_text,
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.snear {
    	  width: 28%;
        }
        .geodir-search .search_by_post, 
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.geodir_submit_search {
    	  width: 20%;
        }
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search {
    	  padding: 10px;
        }
    }
    @media (min-width: 768px) and (max-width: 991px) {
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.search_text,
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.snear {
    	  width: 27%;
        }
        .geodir-search .search_by_post, 
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.geodir_submit_search {
    	  width: 20%;
        }
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search {
    	  padding: 10px;
        }
    }
    @media (min-width: 320px) and (max-width: 767px) {
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.search_text,
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.snear {
    	  width: 100%;
    	  margin: 5px auto;
        }
        .geodir-search .search_by_post, 
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search input.geodir_submit_search {
    	  width: 100%;
    	  margin: 5px auto;
        }
        .geodir_advanced_search_widget .geodir-loc-bar .geodir-loc-bar-in .geodir-search {
    	  padding: 10px;
    	  margin: 5px auto !important;
        }
        .geodir_advanced_search_widget input, .geodir_advance_search_widget input {
    	  margin: 5px auto !important;
        }
    }
    in reply to: Woo Commerce shopping cart icon in main menu #106483
     rikbutterflyskull
    Participant

    oh i had forgotten a piece of code, i’m really sorry ๐Ÿ˜€

    COPY CODE
    function cart_to_shop() {
        if ( is_woocommerce() || is_cart() || is_checkout() ) { } else {
    echo "<style  type=\"text/css\" media=\"screen\">.shop-drop {display:none!important;}</style>";
        }
    }
    add_action('wp_head', 'cart_to_shop');
    in reply to: Woo Commerce shopping cart icon in main menu #106417
     rikbutterflyskull
    Participant

    after

    <?php

    COPY CODE
    /**
     * @package WordPress
     * @subpackage Kleo
     * @author SeventhQueen <themesupport@seventhqueen.com>
     * @since Kleo 1.0
     */
    
    /**
     * Kleo Child Theme Functions
     * Add custom code below
    */ 
    in reply to: Woo Commerce shopping cart icon in main menu #106298
     rikbutterflyskull
    Participant

    Sorry this is correct:

    COPY CODE
    function cart_to_shop() {
        if ( is_woocommerce() || is_cart() || is_checkout() ) { } else {
    echo "<style  type=\"text/css\" media=\"screen\">.shop-drop {display:none!important;}</style>";
        }
    }
    in reply to: Woo Commerce shopping cart icon in main menu #106295
     rikbutterflyskull
    Participant

    Taken from this topic: https://archived.seventhqueen.com/forums/topic/hide-menu-on-all-pages/#post-96077

    Prerequisites: WooCommerce, wc pages, Theme Option > Woocommerce > Menu cart location* = Primary.

    add this to child functions.php

    COPY CODE
    function cart_to_shop() {
        if ( is_woocommerce() || is_cart() || is_checkout() ) { } else {
    echo "<style  type=\"text/css\" media=\"screen\">.shop-drop {display:none!important;}</style>}";
        }
    }

    is_woocommerce reference. For is_cart and is_checkout look at “includes/wc-conditional-functions.php” source.

    in reply to: Default Featured Image Placeholder Issue #104505
     rikbutterflyskull
    Participant

    I fix that.

    kleo-framework/lib/function-core.php

    COPY CODE
    function kleo_get_post_thumbnail_url( $post_id = null ) {
    	$image_url = '';
    
        $thumb = get_post_thumbnail_id( $post_id );
        //all good. we have a featured image
        $featured_image_url = wp_get_attachment_url( $thumb );
        if ( $featured_image_url ) {
            $image_url = $featured_image_url;
        } elseif ( sq_option( 'blog_get_image', 1 ) == 1 ) {
            global $post;
            if (! is_object($post) && $post_id != NULL  ) {
                $post = setup_postdata( get_post($post_id) );
            }
            ob_start();
            ob_end_clean();
            if (isset($post->post_content)) {
                $output = preg_match_all('|<img.*?src=[\'"](.*?)[\'"].*?>|i', $post->post_content, $matches);
                $image_url = isset($matches[1][0]) ? $matches[1][0] : null;
            }
        }
    
        //Defines a default image  
        if ( empty( $image_url ) && get_post_type() == 'post' )  { //** NEW Filter the post_type to 'post'
            $image_url = sq_option_url('blog_default_image', '');  
        }
        return $image_url;
    }

    lib/theme-functions.php // function kleo_ajax_search() – Line 647

    Line 770-785

    COPY CODE
                        $format = get_post_format( $post->ID );
                        if ( $img_url = kleo_get_post_thumbnail_url( $post->ID ) ) {
                            $image = aq_resize( $img_url, 44, 44, true, true, true );
                            if( ! $image ) {
                                $image = $img_url;
                            }
                            $image = '<img src="'. $image .'" class="kleo-rounded">';
                        } else {
                            if ($format == 'video') {
                                $image = "<i class='icon icon-video'></i>";
                            } elseif ($format == 'image' || $format == 'gallery') {
                                $image = "<i class='icon icon-picture'></i>";
                            } else {
                                $image = "<i class='icon icon-link'></i>";
                            }
                        }

    becomes

    COPY CODE
                        $format = get_post_format( $post->ID );
                        if ( $img_url = kleo_get_post_thumbnail_url( $post->ID ) ) {
                                $image = aq_resize( $img_url, 44, 44, true, true, true );
                            // if( ! $image ) {
                                // $image = $img_url;
                            // }
                            $image = '<img src="'. $image .'" class="kleo-rounded">';
    
                        } else {
                            if ($format == 'video') {
                                $image = "<i class='icon icon-video'></i>";
                            } elseif ($format == 'image' || $format == 'gallery') {
                                $image = "<i class='icon icon-picture'></i>";
                            } else {
                            	if (get_post_type( $post->ID ) == 'post') { //** NEW - Post_type filter
                            		$image = '<img src="'. sq_option_url('blog_default_image', '') .'" class="kleo-rounded ajax_search_image">'; //** NEW - Providing default image url + .ajax_search_image css class
                                }
                                else {
                                	$image = "<i class='icon icon-link'></i>";
                                }
                            }
                        }

    Results on screenshots

    in reply to: Default Featured Image Placeholder Issue #104115
     rikbutterflyskull
    Participant

    Hi, in function-core.php i replace in ‘function kleo_get_post_thumbnail_url( $post_id = null )’

    COPY CODE
    //Defines a default image
        if ( empty( $image_url ) )  {
            $image_url = sq_option_url('blog_default_image', '');
        }
    
        return $image_url;

    with

    COPY CODE
        //Defines a default image  
        if ( empty( $image_url ) && get_post_type() == 'post' )  {
            $image_url = sq_option_url('blog_default_image', '');  
        }
        elseif ( empty( $image_url ) and  get_post_type() == 'any' ) {
        	$image_url = '';
        }
        return $image_url;

    I don’t know if it’s the best solution, but is fully works only in Search Result page. In Search dropdown results the ‘sq_option_url(‘blog_default_image’, ”)’ isn’t showed (both posts and pages), but the Featured image in Post Setup is working, better than before. Now i have to test the Page Featured Image.

    I’ll check the Search Ajax Dropdown results later (theme-option.php). If needed, can i ask you some techical info though is not covered by Support Service?

    in reply to: GEO Directory Listing page / which template to customize? #104042
     rikbutterflyskull
    Participant

    @Andrei i’ve tried your css and not working. After a deep search i found many solutions, the one that works for me:

    COPY CODE
    :lang(it) .map_category>.toggle:before { content: 'Filtra le Categorie' !important; }
    :lang(en) .map_category>.toggle:before { content: 'Categories Filter' !important; }

    putting it in kleo-child/style.css

    in reply to: Geo Directory Location Manager – Search bar oversize #103117
     rikbutterflyskull
    Participant
    COPY CODE
    add_action('kleo_before_content','add_search_map');
    function add_search_map() {
        if (geodir_is_page('search') || is_post_type_archive() && in_array(get_post_type(), geodir_get_posttypes())) {
            echo do_shortcode('[gd_listing_map width=100% height=350 autozoom=true scrollwheel=false]');
        }
    }

    Next time use the search function included in this forum ๐Ÿ™‚

    in reply to: Geo Directory Location Manager – Search bar oversize #100935
     rikbutterflyskull
    Participant

    Add to functions.php for GD Listing pages full-map:

    COPY CODE
    add_action('kleo_before_content','add_map');
    function add_map() {
        if (is_post_type_archive() && in_array(get_post_type(), geodir_get_posttypes())) {
            echo do_shortcode('[gd_listing_map width=100% height=350 scrollwheel=false]');
        }
    }

    Customize your map with GD Shortcodes

    in reply to: Geodirectory listing page fullwidth map #100701
     rikbutterflyskull
    Participant

    Hi, i had the same problem today. Solved by the first function

    COPY CODE
    add_action('kleo_before_content','add_map');
    function add_map() {
        if (is_post_type_archive() && in_array(get_post_type(), geodir_get_posttypes())) {
            echo do_shortcode('[gd_listing_map width=100% height=350 scrollwheel=false]');
        }
    }

    replacing the shortcode [gd_homepage_map] only for homepage with [gd_listing_map] for listing page, in according with Geodirectory shortcodes

Viewing 17 posts - 1 through 17 (of 17 total)

Log in with your credentials

Forgot your details?