Meta Title & Tags

This topic contains 12 replies, has 2 voices, and was last updated by  Lance Sampson 7 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #369367

    Lance Sampson
    Buyer
    Post count: 108

    Hi

    I have two separate questions.

    First, how do I add the “keyword tags” to the bottom of the details page on the supreme template. I cant see where tags are shown anywhere.

    Second, I need to add the “zip code” on the meta title and meta description on the details page thru yoast. Is there a short code for yoast for the zip code like %%zip code%%? I see where I can add the address and city but I need the zip code for SEO purposes?

    Thanks in advance!

    #369400

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Lance,

    #1 This will be fixed in the next release of the supreme theme.

    #2 Not by default, you would need to add a code snippet to make that work.

    Not tested but something like:

    
    
    add_filter( 'geodir_filter_title_variables_vars', '_my_extra_seo_vars',10,4);
    
    function _my_extra_seo_vars( $title, $location_array, $gd_page, $sep ){
    	global $post;
    
    	if ( strpos( $title, '%%post_zip%%' ) !== false ) {
    		
    		$title = str_replace( "%%post_zip%%", $post->post_zip, $title );
    	}
    
    	return $title;
    }

    Thanks,

    Stiofan

    #369440

    Lance Sampson
    Buyer
    Post count: 108

    Hi Stiofan

    I add this to the places meta tag in yoast.

    %%title%% %%in_location%% %%post_zip%%

    The “title” and “in locaiton” shows. But the “post zip” does not work.

    Any suggestions?

    Thanks and Best Regards!

    #369587

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Try it now, there was a mistake in the code.

    Stiofan

    #369600

    Lance Sampson
    Buyer
    Post count: 108

    Hi Stiofan

    I updated the code but its still does not work.

    #369638

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Can you provide wp-admin and i’ll take a look?

    Stiofan

    #369662

    Lance Sampson
    Buyer
    Post count: 108
    This reply has been marked as private.
    #369667

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Thanks for the info, i was using the standard hook instead of the wpSEO one we have, i have added it and for future reference here is the code:

    
    
    add_filter( 'geodir_wpseo_replacements_vars', '_my_extra_seo_vars',10,2);
    
    function _my_extra_seo_vars( $vars, $location_array ){
      global $post;
      
      $vars['%%post_zip%%'] = isset($post->post_zip) ? $post->post_zip : '';
      
       return $vars;
    }

    Thanks,

    Stiofan

    #369673

    Lance Sampson
    Buyer
    Post count: 108

    Stiofan

    Thank you so much. That is going to be a great benefit to my SEO.

    Keep up the good work!

    Best Regards

    #369674

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are welcome 🙂
    If you have not already feel free to leave us feedback to help us grow!
    https://wordpress.org/support/plugin/geodirectory/reviews/?rate=5#new-post

    Thanks and good luck!

    Stiofan

    #369877

    Lance Sampson
    Buyer
    Post count: 108

    Review complete!

    #370157

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Thank you! 🙂

    #374606

    Lance Sampson
    Buyer
    Post count: 108

    Stiofan,

    You gave me a to snippet to add the “zip code” for the variables for the meta tags in Yoast for SEO per this thread.

    I have update the plugins and realized that I can now use the GD meta titles and descriptions override. I think its great because it will save tons of time from having to manual add the meta info for all the “locations pages” on an ongoing basis.

    With this change, the “zip code” seems not to work with the GD metas. Can you give me a snippet to make them work with the GD metas?

    Best Regards,

Viewing 13 posts - 1 through 13 (of 13 total)

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

Open Support Ticket