Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:54:31+00:00 2026-06-03T13:54:31+00:00

This is my first question here, hope to be useful in future to someone.

  • 0

This is my first question here, hope to be useful in future to someone. We work on a WordPress site now, and try to display meta description content generated by All In One Seo plugin outside the loop. It’s not a problem when it’s on page/post. The code that works for single is

<?php $metadesc = get_post_meta($post->ID, '_aioseop_description', true);
if ($metadesc) {
echo $metadesc;
} else {
the_excerpt();
}
?>

Later on the other day I came with this solution

<?php $mykey_values = get_post_custom_values('_aioseop_description'); 
foreach ( $mykey_values as $key => $value ) {
echo "$value"; 
 } ?>

I’m not sure if it’s good to use this one, the problem I have now is that I want to display exact number of symbols, not all the content.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:54:32+00:00Added an answer on June 3, 2026 at 1:54 pm

    Well it was pretty lame question, but sometimes when you are stuck it’s hard to see simple things. This is my final code which do the work for me:

    <?php $mykey_values = get_post_custom_values('_aioseop_description');
    foreach ( $mykey_values as $key => $value ) {
    echo substr("$value",0 ,150); //This will display the first 150 symbols
    } ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this my first question on here. I hope someone can help. It is to
this is my first question here so I hope I can articulate it well
This is my first time here so I hope I post this question at
This is my first question here so try to make my best so you
this is my first question.. so, here we go. i have a site, 100%
This is my first question here and I hope it is simple enough to
This is my first question here, so I hope that I am providing enough
Since this is my first question here on stackoverflow I hope my question is
This is my first question here on stackoverflow, so I hope that I am
thats my first question here and i hope someone can help me. I´m new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.