• Resolved Tony Franco

    (@tony-franco)


    Dear Sirs,

    I hope you are fine!

    Please, i´m editting my category´s page, and i would like to use the aio description instead of the_excerpt. Is this possible?

    Thanks and Regards,
    Tony

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support shivamtyagi

    (@shivamtyagi)

    Hi @tony-franco,

    You can set the Meta Description format for your categories by going to All in One SEO > Search Appearance > Taxonomies under the Categories section. The default is set to “Category Description” smart tag.

    Setting custom SEO titles and meta descriptions for individual categories is a Pro feature and is only available with All in One SEO Pro.

    Thread Starter Tony Franco

    (@tony-franco)

    Hi @shivamtyagi,

    Thank you by reply!

    Please, i think i didn´t explain right… i have this category presentation page:

    https://www.eter7.com.br/category/produtos/

    The post description with the_excerpt wordpress function takes the first lines and most of times, it gets confusing.

    Instead of All in One Seo meta description of the post that is filled with a good sentence, so i´m looking for a way to put this meta description, maybe with a shortcode, the problem is that i don´t know how to do this shortcode…

    Thanks and Regards,
    Tony

    Plugin Support shivamtyagi

    (@shivamtyagi)

    @tony-franco, That meta description is coming from the Description field of your category and you can change that by editing your category.

    Unfortunately, there’s no way of setting a format that uses the meta description of the Post in a category as the meta description for that category.

    Thread Starter Tony Franco

    (@tony-franco)

    Hi @shivamtyagi

    I mean the post descriptions at category page: https://ibb.co/3f3WHTd

    Plugin Author arnaudbroes

    (@arnaudbroes)

    @tony-franco I think I understand what you mean. You want to display the meta description for each post instead of the excerpt that your theme is generating, correct?

    In that case, you should be able to override your theme’s archive page template in your child theme and use the following code to output the meta description –

    <?php
    if ( function_exists( 'aioseo' ) ) {
    	echo esc_html( aioseo()->meta->description->getPostDescription( $postId ) );
    }

    You just need to make sure that you pass in the post ID for each post.

    Thread Starter Tony Franco

    (@tony-franco)

    Hi @arnaudbroes

    Thank you very much!!

    That´s it! with your warning to pass the ID, the code that worked:

    <?php if (function_exists(‘aioseo’)) { echo esc_html(aioseo()->meta->description->getPostDescription($postId = get_the_ID())); } ?>

    Best Regards,
    Tony

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Meta description doubt’ is closed to new replies.