Can we edit near me page?
This topic contains 17 replies, has 3 voices, and was last updated by Kiran 4 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: snippet
-
AuthorPosts
-
January 21, 2020 at 12:46 pm #526675
Hi,
let me elaborate the issue, below is the page I am talking about –
https://foodonstreets.com/location/near/me/28.661350400000003,77.2743168/
Can we do the following changes on the pages and if yes how those can be done –
1. Not showing categories on these pages but need to show on other location pages?
2. Also can we have filter on this page by post type, as of now it shows only places (street food in my case), is there any way can we have a filter on this page which shows all the listed basis the post type? please suggest?
3. Is there a way I can remove the header which is showing with background image and showing search bar above the listing only?
Thanks
January 21, 2020 at 4:47 pm #526715Hello,
For #2 you will want to add additional GD Listings elements to the location page template. Add at least one for each post type.
https://wpgeodirectory.com/docs-v2/templates/location/
I will flag your topic for the developers, they may know of a way to add a body class so you can target CSS to the location/near/me page. You could do 1 and 3 like that with your custom CSS.
January 22, 2020 at 5:11 am #526806Hello,
Try following PHP snippet to add body class on location page.
function gd_snippet_location_me_body_class( $classes = array() ) { global $geodirectory; if ( ! empty( $geodirectory ) && ! empty( $geodirectory->location ) && geodir_is_page( 'location' ) ) { $classes[] = 'gd-page-location-' . $geodirectory->location->type; } return $classes; } add_filter( 'body_class', 'gd_snippet_location_me_body_class', 100 );
This will add CSS class like gd-page-location-me or gd-page-location-city or gd-page-location-region or gd-page-location-country to body based on current location type.
Regards,
KiranJanuary 24, 2020 at 8:32 pm #527319Hi,
Link to Look after doing the changes – https://foodonstreets.com/location/near/me/28.661350400000003,77.2743168/?jkhkhjkhkj
@alex thanks for the update, I have added all post types, is there a way that these can be presented in a better way? like in a tab or like a filter ?
@kiran I have added the snippet code but nothing is working, just to remind you again, need to solve 2 objectives – not showing categories on near me location page but on other location pages it will be shown and removing the big header from the page and shifting the search box just above the listing itself.
Thanks!
January 25, 2020 at 4:18 am #527338Hello,
Please provide wp admin credentials so we can check the snippet on your site.
The snippet will add a body class so you can apply custom CSS to the location/near/me page. For example this CSS to hide the header on the location/near/me page
.gd-page-location-me .featured-area.type-location { display:none; }
You can use similar custom css to target GD Categories.
January 26, 2020 at 5:18 pm #527430This reply has been marked as private.January 27, 2020 at 11:30 am #527493Hello rajatonnet,
The snippet you added was not executing so it was not adding css class “gd-page-location-me” to body.
I have added snippet under Snippets, now it adds gd-page-location-me to body.
Now you can hide div element on /location/near/me/ page by using .gd-page-location-me as a parent css class.
Kiran
January 28, 2020 at 3:44 am #527644This has to be done by short code?
I am still able to see it on the all the location page, I just want this to dis appear on the near me page?
Thanks
January 28, 2020 at 10:45 am #527689You can hide it with custom css now that the snippet is working.
I can give you an example.
Can you take a screenshot and show me what you want to hide on the location near me page?
January 30, 2020 at 11:51 am #528021Thanks, you guyz have to help me as in how this has to be implemented, attached is the screenshot of components which i don’t want to show it on near me page –
1. Main background search component, page title would remain though.
2. All categories component.Also please suggest can the page title and meta title for this page can be changed?
It looks so incomplete, I want something combination with near me if I cant make other near me page.Thanks!
January 30, 2020 at 11:52 am #528024But on rest of the location pages it will be visible..
January 30, 2020 at 12:45 pm #528031are you guyz doing anything ?
i got this message at the end on all my website pages?
Please see..
January 30, 2020 at 12:48 pm #528034Hello @rajatonnet,
No we don’t have made any updates on your site. Let me check what is the issue.
Kiran
January 30, 2020 at 1:12 pm #528038This reply has been marked as private.January 30, 2020 at 2:27 pm #528048This reply has been marked as private. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket