WordPress.org

Ready to get started?Download WordPress

Forums

MultiTags
[resolved] proper tags in RSS feeds (5 posts)

  1. upyup
    Member
    Posted 3 years ago #

    Hi

    many thanks for this very useful plugin, its solves efficiently the multi tags issues adressed, but... would'nt be nicer if the rss feed could be corrected too ?

    ie: http://www.itsogay.com/tag/bar+montpellier

    -> <title>Bar Montpellier > itSOgay</title> = GREAT!
    -> <meta name="keywords" content="Bar, Montpellier" /> = GREAT!

    -> link rel="alternate" type="application/rss+xml" title="itSOgay » bar Tag Feed" href="http://www.itsogay.com/tag/bar/feed" = BAD

    My little bit...

    http://wordpress.org/extend/plugins/multitags/

  2. Stefan
    Member
    Plugin Author

    Posted 3 years ago #

    Hi upyup,

    thanks for your feedback.

    Yes. You're right. I totally forgot about the feed.
    I will look into it and add this to the plugin.

    Thanks for the hint.
    Best regards
    Stefan

  3. Stefan
    Member
    Plugin Author

    Posted 3 years ago #

    Hi upyup,

    sorry to say, but adapting the feed is not possible from inside the plugin.
    I have searched through the wordpress-code to find, where the feed-information is set. And that's deep inside the core, without the possibility to hook into.

    If you want to patch the core you can do so in wp-include/general-template.php

    You find (in WP 3.0.1):

    } elseif ( is_tag() ) {
    		$tag_id = intval( get_query_var('tag_id') );
    		$tag = get_tag( $tag_id );
    
    		$title = esc_attr(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $tag->name ));
    		$href = get_tag_feed_link( $tag_id );

    You can replace $tag->name with multi_tags_get_title() (at least the title will then be better, but the link is still wrong)

    I will add a convenience-function similar to "get_tag_feed_link" which will hanlde multiple tags, but you still have to change part of the core. Which is a bad thing.

  4. Stefan
    Member
    Plugin Author

    Posted 3 years ago #

    Hi upyup,

    I updated to a new version and with that you can correct the RSS-feeds as well (after some fuddling with core-files).
    I added the tutorial how to do that in the FAQ of the Plugin.

    Best regards
    Stefan

  5. Stefan
    Member
    Plugin Author

    Posted 3 years ago #

    For the 3.1 release the lines that have to be changed to get the "multi-tag"-feed working are a little bit different, than mentioned in the faq.

    In wp-includes/general-template.php

    you have to replace (in the if-branch ( is_tag() )):

    $title = esc_attr(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name ));
    $href = get_tag_feed_link( $term->term_id );

    with
    if ( function_exists('multi_tags_get_title') )
    $title = esc_attr(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], multi_tags_get_title() ));
    else
    $title = esc_attr(sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name ));
    if ( function_exists('multi_tags_get_tag_feed_link') )
    $href = multi_tags_get_tag_feed_link( $tag_id );
    else
    $href = get_tag_feed_link( $term->term_id );

    Hope you enjoy this plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags