Giri

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 2,661 total)
  • Author
    Posts
  • in reply to: Author page and link #397896

    Giri
    Full Member
    Post count: 3155

    Hi there,

    I have added a filter. Please apply this patch in your website.
    https://github.com/GeoDirectory/geodirectory/pull/446/commits/2087ae0fce14827583d0b35a10f4e05f72bed459

    and then add this snippet in code snippets.

    
    
    
    add_filter('geodir_reviewer_content_author_link', '__return_false');
    in reply to: Hide profile tabs to users by role #397869

    Giri
    Full Member
    Post count: 3155

    Hi Laura,

    Try removing the

    pre_

    in my code

    Thanks

    in reply to: new supreme directory pages #397855

    Giri
    Full Member
    Post count: 3155

    i still missing featured area in
    http://findercoach.com/author/?geodir_dashbord=true&stype=gd_place that is page not found redirection

    Try removing this line.

    || geodir_is_page('author')

    and in
    http://findercoach.com/2017/09/26/175/
    http://findercoach.com/category/calcio-2/
    now i have the correct grey header but i need to remove featured area

    You mean, you want to completely get rid of that featured area?

    in reply to: Inserting Adsense Block Below Search On Homepage #397844

    Giri
    Full Member
    Post count: 3155

    You are welcome.

    in reply to: Inserting Adsense Block Below Search On Homepage #397738

    Giri
    Full Member
    Post count: 3155

    Hi Christian,

    Install code snippets plugin and then use this code.

    https://wordpress.org/plugins/code-snippets/

    
    
    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();
        ?>
        <div class="home-page-ad">
            Ad code goes here
        </div>
        <?php
        echo do_shortcode('[gd_popular_post_category category_limit=5 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('init', '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');
    }
    in reply to: Hide profile tabs to users by role #397697

    Giri
    Full Member
    Post count: 3155

    Hi Laura,

    You can use pre_option filter.

    
    
    add_filter('pre_option_geodir_show_addlisting_nav', 'modify_geodir_show_addlisting_nav');
    function modify_geodir_show_addlisting_nav($value) {
    	$user = wp_get_current_user();
    	$allowed_roles = array('subscriber');
    	if( array_intersect($allowed_roles, $user->roles ) ) {
    		return false;
    	}
    	return $value;
    }
    in reply to: new supreme directory pages #397692

    Giri
    Full Member
    Post count: 3155

    Hi there,

    Apologies. All your replies are found in my spam folder.

    This seems like a single post.

    http://findercoach.com/2017/09/26/175/

    So you need to use

    is_single()

    This seems like a category

    http://findercoach.com/category/calcio-2/

    So you need to use

    is_archive()

    So final code would be

    
    
    function sd_custom_header_body_class($classes)
    {
    	if (
    		geodir_is_page('add-listing') 
    		|| geodir_is_page('listing')
    		|| geodir_is_page('search')
    		|| geodir_is_page('author')
    		|| geodir_is_page('location')
    		|| geodir_is_page('preview')
    		|| geodir_is_page('listing-success')
    		|| geodir_is_page('info')
    		|| geodir_is_page('login')
    		|| geodir_is_page('checkout')
    		|| geodir_is_page('invoices')
                    || is_archive()
                    || is_single()
    	) {
    		return $classes;
    	}
    	
    	if (!in_array("sd-homepage", $classes)) {
    		$classes[] = 'sd-homepage';
    	}
    	return $classes;
    }
    add_filter('body_class', 'sd_custom_header_body_class');

    Hope that helps

    in reply to: Bottom Section Styling Issue #397671

    Giri
    Full Member
    Post count: 3155
    This reply has been marked as private.
    in reply to: UsersWP soft launch – Feedback Wanted #397668

    Giri
    Full Member
    Post count: 3155
    in reply to: Hide profile tabs to users by role #397657

    Giri
    Full Member
    Post count: 3155

    I have another related question: how can I hide “Add listing” menu item if the user is a subscriber.

    Could you be more specific? Are you talking about the “My Dashboard” widget? or the menu nav items?

    in reply to: After a domain name change functions and pictures are missing #397497

    Giri
    Full Member
    Post count: 3155

    Hi Jennifer,

    Change the value

    1200px

    to percentage like

    90%

    to make it responsive.

    Ofcourse play with the values. It can be 95%, 96% etc.

    in reply to: new supreme directory pages #397425

    Giri
    Full Member
    Post count: 3155

    You are welcome 🙂

    in reply to: new supreme directory pages #397420

    Giri
    Full Member
    Post count: 3155

    Ok replace my old code with this one.

    
    
    
    function sd_custom_header_body_class($classes)
    {
    	if (
    		geodir_is_page('add-listing') 
    		|| geodir_is_page('listing')
    		|| geodir_is_page('search')
    		|| geodir_is_page('author')
    		|| geodir_is_page('location')
    		|| geodir_is_page('preview')
    		|| geodir_is_page('listing-success')
    		|| geodir_is_page('info')
    		|| geodir_is_page('login')
    		|| geodir_is_page('checkout')
    		|| geodir_is_page('invoices')
    	) {
    		return $classes;
    	}
    	
    	if (!in_array("sd-homepage", $classes)) {
    		$classes[] = 'sd-homepage';
    	}
    	return $classes;
    }
    add_filter('body_class', 'sd_custom_header_body_class');

    The above code excludes certain GD pages. Hope that helps.

    Thanks

    in reply to: how to edit the menu width size? #397417

    Giri
    Full Member
    Post count: 3155
    
    
    header nav .nav li a:hover {
        padding: 0 !important;
        border-right: none !important;
    }
    in reply to: new supreme directory pages #397413

    Giri
    Full Member
    Post count: 3155

    Ok in GD terminalogy,

    we have pages like Listing pages, Detail pages, Add listing pages

    Detail page is the single listing page.

    As far as I know you have featured images only on single pages.

    How about we target only the detail pages?

Viewing 15 posts - 31 through 45 (of 2,661 total)