Tagged: excerpt, grid layout, meta description
Hi,
I’d like to use the meta description from posts instead of the excerpt for posts displayed in the grid layout on the front page of my site
Any help would be gratefully received, been trying for a couple of hours with no luck!
Hi CrispyFried!
Thank you for using Enfold.
You’re trying to fetch the data from a custom field, right? If yes, you can modify the includes > loop-index.php file then look for this code:
echo $content_output;
If you’re using the elegant style, the code is located on line 199, if not, edit line 250. This links will help:
https://codex.wordpress.org/Custom_Fields
Use the get_post_meta function to fetch the custom field data.
UPDATE: I just realized that you’re referring to the meta description tag. Are you using a plugin for that? If it is yoast, you can ask them how to fetch those data and relay it back on a template. This link might help: https://codex.wordpress.org/XML-RPC_WordPress_API/Posts
Regards,
Ismael