<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Wordpress] Modificare plugin add-meta-tags]]></title><description><![CDATA[<p dir="auto">Come da titolo, ho aggiunto il plugin add-meta-tags, mi piace pero' come inserisce la description, ma non come inserisce le keywords, per questo secondo tag, ho aggiunto un'altro plugin, ora pero' mi trovo con un doppio tag keywords.<br />
Puo' creare problemi?</p>
<p dir="auto">In caso affermativo, come posso modificare il plugin per fargli generare solo il meta tag description?</p>
<p dir="auto">Questo e' il plugin:</p>
<pre><code class="language-php">&lt;?php
/*
Plugin Name: Add Meta Tags
Plugin URI: http://www.raoul.shacknet.nu/2006/01/05/add-meta-tags-wordpress-plugin/
Description: Adds the post's categories and excerpt to the keywords and the description XHTML meta tags respectively, while viewing single posts.
Version: 0.2
Author: Raoul
Author URI: http://www.raoul.shacknet.nu/
*/

/*
License: GPL
Compatibility: All

Installation:
Place the add-meta-tags.php file in your /wp-content/plugins/ directory
and activate through the administration panel.
*/

/*  Copyright (C) Raoul (http://www.raoul.shacknet.nu/)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/


/* Changelog
* Fri Jan 6 2006 - v0.2
- Duh! I had forgotten to strip the tags from the excerpt. Now it's fixed.
* Thu Jan 5 2006 - v0.1
- Initial release
*/


function amt_add_meta_tags() {
    global $posts;
    
    if ( is_single() ) {
        // Description
        $my_metatags = "\n&lt;meta name=\"description\" content=\"" . strip_tags(get_the_excerpt()) . "\" /&gt;";
        // Keywords
        $my_metatags .= "\n&lt;meta name=\"keywords\" content=\"";
        foreach((get_the_category($posts[0]-&gt;ID)) as $cat) {
            $my_metatags .= $cat-&gt;category_nicename . ', ';
        }
        $my_metatags = substr($my_metatags, 0, -2) . "\" /&gt;\n";
    }
    echo $my_metatags;
}

add_action('wp_head', 'amt_add_meta_tags');

?&gt;
</code></pre>
<p dir="auto">Ciaooooo <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/topic/14041/wordpress-modificare-plugin-add-meta-tags</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 18:39:51 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/14041.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Jul 2006 07:25:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Wordpress] Modificare plugin add-meta-tags on Mon, 24 Jul 2006 10:43:40 GMT]]></title><description><![CDATA[<p dir="auto">Grazieeee, ci stavo perdendo la testa <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/ad0a1f8d-b404-40e4-a46a-e563b14044da-dho.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--arrabbiato" style="height:1.4em;width:auto;vertical-align:middle" title=":x" alt="" /> lasciavo l'ultima riga, ecco perche' non funzionava <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
<p dir="auto">Ciaooooo <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/349481</link><guid isPermaLink="true">https://dev.connect.gt/post/349481</guid><dc:creator><![CDATA[sawadee]]></dc:creator><pubDate>Mon, 24 Jul 2006 10:43:40 GMT</pubDate></item><item><title><![CDATA[Reply to [Wordpress] Modificare plugin add-meta-tags on Mon, 24 Jul 2006 09:34:41 GMT]]></title><description><![CDATA[<p dir="auto">commenta tutto sto pezzo</p>
<blockquote>
<p dir="auto">$my_metatags .= "\n&lt;meta name="keywords" content="";<br />
foreach((get_the_category($posts[0]-&gt;ID)) as $cat) {<br />
$my_metatags .= $cat-&gt;category_nicename . ', ';<br />
}<br />
$my_metatags = substr($my_metatags, 0, -2) . "" /&gt;\n";</p>
</blockquote>
]]></description><link>https://dev.connect.gt/post/349482</link><guid isPermaLink="true">https://dev.connect.gt/post/349482</guid><dc:creator><![CDATA[tambu]]></dc:creator><pubDate>Mon, 24 Jul 2006 09:34:41 GMT</pubDate></item></channel></rss>