Adding Code to The theme

Home Forums Iconic One Pro Support Adding Code to The theme

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3047
    KneeOnLite
    Participant

    I have been supplied with a code snippet from a plugin i use to pull in rss feeds it changes the tile to link back to the original source, could you let me know where to insert the code in the template.

    add_filter('the_title', 'rss_link_back_to_source', 10, 2);
    function rss_link_back_to_source($title, $id = null) {
    $originalUrl = get_post_meta($id, 'wprss_item_permalink', true );
    if ($originalUrl !== '') {
    return '<a href="' . $originalUrl . '">' . $title . '</a>';
    } else {
    return $title;
    }
    }
    #3050

    It should go in the functions.php, you can try pasting it at the bottom of functions.php .

    Make sure you have created backup before trying it.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.