• Hi, I am using the below Meta Data code in my Header file. The code, for the most part, is working great. However, the only thing I am having a problem with is, when a single post is shared.

    In the below code example, under single, I have this line of code: <meta property="og:description" That is where I would like a post excerpt to be generated, when a post is shared on Facebook. I have tried a few WordPress tags, but, for some reason, the excerpt is being printed (echoed) just below my header, which, obviously, is not good. And, I don’t know why that is happening.

    Then, as shown below, I currently have that line commented out, and it does generate the excerpt, except, the first line of the excerpt is saying, posted by ‘author’ on ‘postdate,’ which I also do not like.

    Can anybody please help me to get the just the first 30 or so characters from the ‘body’ of the post to display properly, using the below code, or something very similar?

    Thank you,
    Mark

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Meta Data question (WordPress to Facebook)’ is closed to new replies.