WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Google News Sitemap Generator] SPAN-Element in Title

[Plugin: Google News Sitemap Generator] SPAN-Element in Title

  • gossipgirlz
    Member

    @gossipgirlz

    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

Viewing 1 replies (of 1 total)
  • gingerdog
    Member

    @gingerdog

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

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Google News Sitemap Generator] SPAN-Element in Title’ is closed to new replies.