Featured area popular categorise edit.

This topic contains 14 replies, has 4 voices, and was last updated by  Denuwan Vithanage 7 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #391074

    Denuwan Vithanage
    Buyer
    Post count: 35

    In default theme. In featured area there are only 5 place categorise. I need to change that into all my categories. Can anyone tell me what is the piece of cord I need to change this .

    #391094

    Kor
    Moderator
    Post count: 16516

    Hi there,

    Currently, it displays the 5 most popular categories and changing that would require customization. You can find the code here as explained in this section of the documentation https://wpgeodirectory.com/docs/faqs/how-do-i-remove-the-popular-categories-section-from-the-home-page/ .

    #391131

    Denuwan Vithanage
    Buyer
    Post count: 35

    Thank you very much for your quick response. The thing is I need to expand that list. I want to show more than 5 categories.

    echo do_shortcode('[gd_popular_post_category category_limit=5]');

    I tried changing as “category_limit=6”

    But It didn’t work. Is there any other code that I need to construct manually. If so please direct me to the place where it appear.

    Best regards
    Denuwan

    #391167

    Paolo
    Site Admin
    Post count: 31206

    Please provide a link and admin credentials so that we can check what you did and correct it in case there are errors.

    Thanks

    #391170

    Denuwan Vithanage
    Buyer
    Post count: 35

    Thank you.How can I provide admin credentials privately.? I dont think it is good to post that in the forum.

    #391172

    Paolo
    Site Admin
    Post count: 31206

    tick the “Set as private reply” option below the “Notify me of follow-up replies via email”.

    Only moderators will be able to read them.

    Thanks

    #391210

    Denuwan Vithanage
    Buyer
    Post count: 35
    This reply has been marked as private.
    #391238

    Denuwan Vithanage
    Buyer
    Post count: 35

    though I change or edit

    echo do_shortcode('[gd_popular_post_category category_limit=5]');

    nothings happens to the appearance.

    #391449

    Giri
    Expired Member
    Post count: 3155
    This reply has been marked as private.
    #391450

    Giri
    Expired Member
    Post count: 3155

    For the record.

    
    
    function modified_sd_homepage_featured_content() {
    	if (is_singular() && geodir_is_page('location') && $location = sd_gd_current_location_name() ) { ?>
    		<h1 class="entry-title"><?php echo esc_attr(__($location, 'geodirectory')); ?></h1>
    	<?php } else { ?>
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    	<?php }
    
    	$sub_title = get_post_meta(get_the_ID(), 'subtitle', true);
    
    	if (geodir_is_page('location') && defined('GEODIRLOCATION_VERSION')) {
    		$loc = geodir_get_current_location_terms();
    		$location_type = geodir_what_is_current_location();
    		$country_slug = '';
    		$region_slug = '';
    		if ($location_type == 'city') {
    			$slug = $loc['gd_city'];
    			$region_slug = isset($loc['gd_region']) ? $loc['gd_region'] : '';
    			$country_slug = isset($loc['gd_country']) ? $loc['gd_country'] : '';
    		} else if ($location_type == 'region') {
    			$slug = $loc['gd_region'];
    			$country_slug = isset($loc['gd_country']) ? $loc['gd_country'] : '';
    		} elseif($location_type == 'country') {
    			$slug = $loc['gd_country'];
    			$country_slug = isset($loc['gd_country']) ? $loc['gd_country'] : '';
    		}
    		else {
    			$slug = '';
    		}
    		$seo = geodir_location_seo_by_slug($slug, $location_type, $country_slug, $region_slug);
    		$tagline = (isset($seo->seo_image_tagline)) ? __($seo->seo_image_tagline, 'geodirlocation') : '';
    		if ($tagline) {
    			$sub_title = stripslashes($tagline);
    		}
    
    	}
    	if (isset($sub_title)) {
    		echo '<div class="entry-subtitle">' . $sub_title . '</div>';
    	}
    
    	sd_search_form_shortcode();
    	echo do_shortcode('[gd_popular_post_category category_limit=6 category_restrict=1]');
    
    	echo '<div class="home-more" id="sd-home-scroll"><a href="#sd-home-scroll" ><i class="fa fa-chevron-down"></i></a></div>';
    }
    add_action('geodir_wrapper_open', 'modified_sd_homepage_featured_content_init', 4);
    function modified_sd_homepage_featured_content_init() {
    	remove_action('sd_homepage_content','sd_homepage_featured_content');
    	add_action('sd_homepage_content','modified_sd_homepage_featured_content');
    }
    #391465

    Denuwan Vithanage
    Buyer
    Post count: 35

    Thank you very much on your effort. It works very well. I need another small help. since I dont havean knowledge on CSS can you help me to increase the space between two rows. as shown in the below image.

    #391483

    Giri
    Expired Member
    Post count: 3155

    Apply this css.

    
    
    .sd.home .featured-area .geodir-pcat-show, .sd.sd-location .featured-area .geodir-pcat-show {
         margin-bottom: 10px;
    }
    #391485

    Denuwan Vithanage
    Buyer
    Post count: 35

    Thank you very much Giri, You are a life saver..:) It worked greatly. appreciate your service.

    #391496

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

    #391688

    Denuwan Vithanage
    Buyer
    Post count: 35

    Hello Giri,

    If you have time please check on this. Though I change the color of the content box it is not changing in the site.

    https://wpgeodirectory.com/support/topic/content-box-background-colour-cannot-change/

    if you want to login you can use previous credentials.

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount