Support » Plugin: All in One SEO Pack » Conditionally Disabling Meta Tags

  • Resolved Siddharth

    (@siddy1705)


    Hello All,

    I am using AIOSEO Plugin especially for unique meta desc for specific pages. I also have hard coded meta desc in my header tag which, for some reason, i cannot take off or change. so now i want to do is check if i have provided AIOSEO a unique meta desc for a page? if not the hard coded desc must get displayed.
    I am looking for some tag like aioseo_description_exists or something similar. Please help.

    Thanks in advance.

    https://wordpress.org/plugins/all-in-one-seo-pack/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wpsmort

    (@wpsmort)

    Support Manager at Semper Fi

    The hardcoded SEO is probably coming from your theme so you should contact your theme developer and ask them how to remove it.

    Plugin Author Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    Best is to not have your theme provide post SEO metadata, as Steve said. But to do what you want…

    The custom description, if it exists, is stored in a custom field in the post meta table called “_aioseop_description”.

    You can do something like:

    if( !get_post_meta( $post->ID, '_aioseop_description', TRUE ){
        //code to run if there's no description field
        }

    You can filter what’s displayed by using the aioseop_description filter:

    aioseop_description

    That worked like a charm..
    I am gonna put my hands on the description filter stuff soon and will need your help again. 🙂

    But thanks a lot for this one. I will mark this one as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditionally Disabling Meta Tags’ is closed to new replies.