Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorcameling
    • CommentTimeMay 13th 2011
     
    Hello, I know some other people have asked about this already but there wasn't an answer that worked for me. I know you can add links in the description field, but then the HTML code shows up in the meta description, and it seems the search engines aren't displaying the description in Search Results because of this. Is there a way to strip the HTML out of the description for the meta tag only? I need the HTML to show in the description on the page, but not in the meta tags. OR I need another field for links on the admin side. I know only enough PHP to edit small things and not ruin it, so I'm a bit out of my league here.

    Any help would be greatly appreciated!
    • CommentAuthorcameling
    • CommentTimeMay 15th 2011 edited
     
    I have figured it out. I kept the HTML in the description for the photo, but stripped it out of the Meta Tag information. For those who need to do this here's how:

    1. Open plog-functions.php
    2. Find the following line of code:

    <meta name="description" content="'.htmlspecialchars($description).'" />' . "\n";

    3. Change it to:

    <meta name="description" content="'.strip_tags(SmartStripSlashes($description)).'" />' . "\n";

    Done! Your HTML code should now show up in your gallery page, but not in the Meta information. Normal text WILL still show up in the Meta information, just not HTML code.