[Support request] Changing image and excerpt source to use meta for some lists

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Changing image and excerpt source to use meta for some lists

This topic contains 3 replies, has 2 voices, and was last updated by  Tom 4 days, 17 hours ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10703

    shpr
    Participant

    Hello,

    could you tell me the function/hook I would need to have specific WP Show Posts lists use the following header meta (set via Yoast SEO) instead of the default?

    * Image: <meta property=”og:image” content=”http://website.com/image.jpg”>
    * Excerpt: <meta property=”description” content=”Blah blah…”>

    eg if I wanted lists 12345, 34567, 56789 to use this instead of the default.

    Thanks

    • This topic was modified 6 days, 8 hours ago by  shpr.
    #10720

    Tom
    Keymaster

    Hi there,

    How would the lists use this data, exactly?

    #10725

    shpr
    Participant

    For these lists the data would be used instead of the defaults ie.

    * Instead of using the Featured Image from the post, it would use the image from meta property=”og:image”
    * Instead of using the Content Excerpt from the post Excerpt, it use the content from meta property=”description”

    The reason is because a plugin I am using to generate Quizzes does not have a Featured Image, nor an Excerpt for each Quiz… WP Show Posts finds the Quiz posts OK and can list them, which is great… but ideally I’d like to display an image (and an excerpt if possible) and because it allows me to add the meta properties via Yoast I thought this might be the easiset way to accomplish it without amending the quiz plugin.

    Thanks

    • This reply was modified 5 days, 10 hours ago by  shpr.
    #10751

    Tom
    Keymaster

    It might be possible if Yoast has a function we can use to get that data. You might want to see if their support can provide whether that’s possible/what the post meta names are. If we have that info, we can likely use hooks to output it in each post.

    I took a quick look through their documentation but couldn’t find any info on getting that data.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.