Sharing Location page (meta title with Rank Math)

This topic contains 9 replies, has 3 voices, and was last updated by  Foster 4 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #527051

    Foster
    Full Member
    Post count: 164

    Hello,

    When I go to a Location page on my site, the title and meta title appears correctly but when I share on Facebook, the link appears as “Location | MySite”.

    I am using Rank Math SEO.
    In GeoDirectory>Settings>Titles & Meta, I have Disable Rank Math set to disable.

    #527072

    Alex Rollin
    Moderator
    Post count: 27815

    To clarify, you want to use the GD settings for Titles & Meta?
    What do you have in the title and meta settings for GD, now?

    #527116

    Foster
    Full Member
    Post count: 164

    As far as I know, using the GD titles is the only way to get Location pages to display the location title properly. So, I have them set to override the Rank Math titles.

    I checked my settings:

    I had the GD title field empty for Location. It looked filled out with default settings.
    I added %%location_single%% for both title and meta title. I don’t think this fixed the issue. It still seems to be pulling the title from Rank Math.

    #527122

    Alex Rollin
    Moderator
    Post count: 27815

    OK, please share credentials so we can check the settings you have there.

    #527124

    Foster
    Full Member
    Post count: 164
    This reply has been marked as private.
    #527128

    Alex Rollin
    Moderator
    Post count: 27815

    Thanks, the developers will take a look.

    #527471

    Naveen Giri
    Moderator
    Post count: 1559
    This reply has been marked as private.
    #527514

    Foster
    Full Member
    Post count: 164

    I meant

      a

    location page, not

      the

    Location page.
    Such as /location/colorado or /location/new-york
    When sharing these pages, The name of the location does not show up.

    #527839

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Foster,

    I have added a snippet here. please have a look.

    
    
    
    function gd_location_page_url_callback( $url ) {
        // Maybe modify $example in some way.
    	$path_location_url = geodir_get_location_link('current');
    	if( geodir_is_page( 'location' ) ){
    		$url = $path_location_url;
    	}	
        return $url;
    }
    add_filter( 'rank_math/opengraph/url', 'gd_location_page_url_callback' );

    Regards
    Naveen

    #527909

    Foster
    Full Member
    Post count: 164

    This seems to work well, thanks.

Viewing 10 posts - 1 through 10 (of 10 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