WordPress.org

Ready to get started?Download WordPress

Forums

All in One SEO Pack
[resolved] Version 2 Broken Site :( (4 posts)

  1. mattblank
    Member
    Posted 1 year ago #

    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/

  2. Peter Baylies
    Member
    Plugin Author

    Posted 1 year ago #

    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;
    }

  3. mattblank
    Member
    Posted 1 year ago #

    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

  4. Peter Baylies
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.