Question Titles & Metas
-
Hi,
I’m trying to set up the Yoast plugin and particularly the Title & Metas section (screenshot: https://i.gyazo.com/b512a7788947eaa20fc346910cab26eb.png ), in particularly for the posts. And I have a question on the setup of the ‘Meta Description template’ pertaining to fetching data from a post.
Now, I have 4 different post formats: Audio, Quote, Image and Video. Now each post format obviously uses different type of input of data.
For instance, a quote post gives you the ability to create a title, add a quote, the author of the quote, optionally the source of the quote and that sort of thing. A
An Image post would allow you to set up the title and the image.
Audio post allows you to set up the title and put in the audio you would like to share, like a soundcloud link or something.
And video allows you to put in a title and obviously a video link like a youtube link.
So one thing they all have in common is that they all use a Title (which post doesn’t huh? ;)). So the %%sitle%% and %%sitename%% will always do their job right.
But when it comes to the description template for each postformat, how do I go about making sure that if for instance there is a Quote post, the meta description template would show the Quote and the Author of the quote (if the author of the quote is set up, cause specifying an author is optional in a quote post).
So for instance.
If my quote is:
“A quote to place here and something interesting to read for the viewer.”
Author: John Campbell
Title of the post: A Quote
See Screenshot of what kind of things you’d be able to put in for a quote post:
https://i.gyazo.com/afc52d8156d48e83ad7a59ce1b1538ed.pngThen I would want the SEO meta data to look like this:
https://i.gyazo.com/5446f8b7f96947fd1f995fbbc55f3f64.png
So the quote would go into the description with a – [Author]. How can I input this sort of thing in Yoast SEO? I mean I know the name fields of all the textareas that I input it in. But how do I get Yoast SEO to actually fetch the inputted data and display it.Like for instance how I did it recently for a few social sites to fetch certain data, like twitter for example. I’d do it like this for a twitter button on a quote post:
<br /> elseif (has_post_format('quote'))<br /> {<br /> ?><br /> <a href="void(0)">_quote_text . "\"" ) ;?>&url=<?php the_permalink();?>" class='twitter has-tooltip' data-title="<?php _e('Share on Twitter', 'Aruna');?>">twitter</a><br /> <?php<br /> }<br />
This is how twitter would show a share for that quote post:
https://i.gyazo.com/b5387a4d919be52794fdd0a778c78851.pngSo this is the sort of thing I’m trying to get Yoast SEO to do as well. Fetch the specific fields into the description meta template depending on what type of post format it is. How would I go about doing this?
I know this is a long post and I could’ve probably made it shorter.
Thanks!
- The topic ‘Question Titles & Metas’ is closed to new replies.