Href tag

I'm able to disable the Entries Rss and Comments feed and when it goes to the next page it displays this

No feed available,please visit our homepage!

I would like to add another link to the below code. Do you know how I can add another link

I changed the below href tag, how could I add anther href tag

wp_die( __('No feed available,please visit our homepage!') );

this is the code that I would like to update and have two links

function wpb_disable_feed() {

wp_die( __('No feed available,please visit our homepage!') );

}

add_action('do_feed', 'wpb_disable_feed', 1);
add_action('do_feed_rdf', 'wpb_disable_feed', 1);
add_action('do_feed_rss', 'wpb_disable_feed', 1);
add_action('do_feed_rss2', 'wpb_disable_feed', 1);
add_action('do_feed_atom', 'wpb_disable_feed', 1);
add_action('do_feed_rss2_comments', 'wpb_disable_feed', 1);
add_action('do_feed_atom_comments', 'wpb_disable_feed', 1);

  • Tyler Postle

    Hey Orlando,

    Where have you placed this code?

    function wpb_disable_feed() {
    
    wp_die( __('No feed available,please visit our <a href="http://excelcoupons.com/commentsfeed/">homepage</a>!') );
    
    }
    
    add_action('do_feed', 'wpb_disable_feed', 1);
    add_action('do_feed_rdf', 'wpb_disable_feed', 1);
    add_action('do_feed_rss', 'wpb_disable_feed', 1);
    add_action('do_feed_rss2', 'wpb_disable_feed', 1);
    add_action('do_feed_atom', 'wpb_disable_feed', 1);
    add_action('do_feed_rss2_comments', 'wpb_disable_feed', 1);
    add_action('do_feed_atom_comments', 'wpb_disable_feed', 1);

    I'll first preface this by saying that I'm not a developer but if you're wanting to add another link there then you can add it within the text you added before. ie.

    function wpb_disable_feed() {
    
    wp_die( __('No feed available,please visit our <a href="http://excelcoupons.com/commentsfeed/">homepage</a>! Or add new link <a href="http://newlink.com">here</a>') );
    
    }
    
    add_action('do_feed', 'wpb_disable_feed', 1);
    add_action('do_feed_rdf', 'wpb_disable_feed', 1);
    add_action('do_feed_rss', 'wpb_disable_feed', 1);
    add_action('do_feed_rss2', 'wpb_disable_feed', 1);
    add_action('do_feed_atom', 'wpb_disable_feed', 1);
    add_action('do_feed_rss2_comments', 'wpb_disable_feed', 1);
    add_action('do_feed_atom_comments', 'wpb_disable_feed', 1);

    Unless I'm misunderstanding what you are wanting to do here. If the above isn't what you are after can you provide some more details on what you are wanting exactly, then I can speak with one of our developers :slight_smile: see if it can be easily done.

    Cheers,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.