WordPress.org

Ready to get started?Download WordPress

Forums

Google News Sitemap Generator
SPAN-Element in Title (2 posts)

  1. gossipgirlz
    Member
    Posted 3 years ago #

    I use a <span>-Element in my title,
    and with this plugin the <span> is shown in Google News. Which is pretty ugly. :(

    For example:
    Before the new plugin it was shown like this in Google News:
    The first part of my Headline: The second part!
    Now it is shown like this:
    <span>The first part of my Headline: </span>The second part!

    Is there a way to make the plugin ignore the <span>-Tags?

    Or the other solution: The plugin writes the TITLEs into the sitemap, instead of the URLs. How can I change the plugin code?

    $xmlOutput.= "\t\t\t<n:title>";
    $xmlOutput.= htmlspecialchars($row->post_title);
    $xmlOutput.= "</n:title>\n";

    into output URL?

    Thanks.
    Sandra

  2. gingerdog
    Member
    Posted 2 years ago #

    You could use PHP's strip_tags().
    i.e. $xmlOutput .= htmlspecialchars(strip_tags($row->post_title));

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic