WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Version 2 Broken Site :(

[Resolved] Version 2 Broken Site :(

  • mattblank
    Member

    @mattblank

    Hi guys,

    I use this code to output the description on to the actual page

    <?php if(function_exists('aiosp_meta')) : ?>
    <?php $description = stripcslashes(get_post_meta($post->ID, '_aioseop_description', true)); ?>
    <?php if(!empty($description)) : ?>
    <?php echo $description; ?>

    This no longer works with the latest version. Any ideas what can be done?

    Thanks!
    Matt

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Peter Baylies
    Participant

    @pbaylies

    mattblank,

    What you’re doing should still work, but you don’t need to be checking for an aiosp_meta function; you could check for the existence of the AIOSEOP_VERSION constant instead, for example:


    <?php
    if( defined( 'AIOSEOP_VERSION' ) ) {
    $description = stripcslashes( get_post_meta( $post->ID, '_aioseop_description', true ) );
    if ( !empty( $description ) ) echo $description;
    }

    mattblank
    Member

    @mattblank

    Thank you! 🙂 That’s fixed it!

    My last question, whilst you’re here, is there anyway to have the description also become the description for og:description, so that when posting to Facebook, it shows the SEO description?

    Thanks!
    Matt

    Plugin Contributor Peter Baylies
    Participant

    @pbaylies

    Matt,

    There currently is not an option for this in the free plugin; however, there is an option for this in the Pro version, in the new Social Meta module.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Version 2 Broken Site :(’ is closed to new replies.