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 Ticket

Tagged: 

  • Author
    Posts
  • #526675

    rajatonnet
    Expired Member
    Post count: 101

    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

    #526715

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    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.

    #526806

    Kiran
    Moderator
    Post count: 7069

    Hello,

    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,
    Kiran

    #527319

    rajatonnet
    Expired Member
    Post count: 101

    Hi,

    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!

    #527338

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    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.

    #527430

    rajatonnet
    Expired Member
    Post count: 101
    This reply has been marked as private.
    #527493

    Kiran
    Moderator
    Post count: 7069

    Hello 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

    #527644

    rajatonnet
    Expired Member
    Post count: 101

    This 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

    #527689

    Alex Rollin
    Moderator
    Post count: 27815

    You 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?

    #528021

    rajatonnet
    Expired Member
    Post count: 101

    Thanks, 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!

    #528024

    rajatonnet
    Expired Member
    Post count: 101

    But on rest of the location pages it will be visible..

    #528031

    rajatonnet
    Expired Member
    Post count: 101

    are you guyz doing anything ?

    i got this message at the end on all my website pages?

    Please see..

    #528034

    Kiran
    Moderator
    Post count: 7069

    Hello @rajatonnet,

    No we don’t have made any updates on your site. Let me check what is the issue.

    Kiran

    #528038

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #528048

    rajatonnet
    Expired Member
    Post count: 101
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 18 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