WordPress.org

Ready to get started?Download WordPress

Forums

Help change function to work with page instead of post (2 posts)

  1. jordanthegreat
    Member
    Posted 2 years ago #

    Hi all,

    I found this function that takes the first image in a post and uses it in a meta tag in the header. This meta tag is what Facebook uses to determine the thumbnail when someone "Likes" that post.

    The problem is that the function does not work with pages and I can't for the life of me figure out how to get it to do so. Any help is much appreciated.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Cheers,
    Jordan

  2. jordanthegreat
    Member
    Posted 2 years ago #

    Code copied to pastebin as per forum rules.

    http://pastebin.com/D70jD6Fr

Topic Closed

This topic has been closed to new replies.

About this Topic