WordPress.org

Forums

bloginfo() acts weird in blog posts (3 posts)

  1. moobs
    Member
    Posted 4 years ago #

    I am using a modified version of WordPress Meta Description to make meta descriptions in my pages and posts.

    Basically it uses excerpt for the meta description, or if no excerpt exists, it uses the tagline, bloginfo('description'). This fallback works fine except in blog posts with no excerpt. Here bloginfo() outputs nothing.

    On posts with no excerpt this will be the result: <meta name="description" content="" /> :-(

    Plugin code:

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

  2. moobs
    Member
    Posted 4 years ago #

  3. moobs
    Member
    Posted 4 years ago #

    Hmm...

    Even if i replace bloginfo('description') with a plain text string, the content property turns out empty! This is still in blog posts with no excerpt.

    Weird!

Topic Closed

This topic has been closed to new replies.

About this Topic