Giri
Forum Replies Created
-
AuthorPosts
-
Hi there,
I have added a filter. Please apply this patch in your website.
https://github.com/GeoDirectory/geodirectory/pull/446/commits/2087ae0fce14827583d0b35a10f4e05f72bed459and then add this snippet in code snippets.
add_filter('geodir_reviewer_content_author_link', '__return_false');
Hi Laura,
Try removing the
pre_
in my code
Thanks
i still missing featured area in
http://findercoach.com/author/?geodir_dashbord=true&stype=gd_place that is page not found redirectionTry 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 areaYou mean, you want to completely get rid of that featured area?
September 28, 2017 at 11:19 am in reply to: Inserting Adsense Block Below Search On Homepage #397844You are welcome.
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'); }
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; }
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
This reply has been marked as private.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?
September 26, 2017 at 6:48 pm in reply to: After a domain name change functions and pictures are missing #397497Hi Jennifer,
Change the value
1200px
to percentage like
90%
to make it responsive.
Ofcourse play with the values. It can be 95%, 96% etc.
You are welcome 🙂
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
header nav .nav li a:hover { padding: 0 !important; border-right: none !important; }
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?
-
AuthorPosts