Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Good day @mdeluk

    This one, I’m not completely sure of. It’s not something we’re explicitly setting with our plugin, and honestly I’m not sure there’s even a setting for the feed URL customization.

    This one feels like it’s something that would trickle down to WordPress core more than CPTUI itself.

    Perhaps some sort of redirect would help in the meantime. Maybe not the most elegant solution, but I think it would ultimately help.

    Thread Starter Matt Lovett

    (@mdeluk)

    Hi Michael,

    Thanks for your reply, good point regarding the redirect! Its a bit of a messy solution but its a fix never the less for now. ??

    I am no developer but there is a way to customise the main RSS feed from Google so I am guessing if this can be customised any RSS for any page can be?

    As someone mentioned adding the following to functions.php to customise the main RSS feed:

    // replace the default posts feed with custom URL
    function appthemes_custom_rss_feed( $output, $feed ) {
        if ( strpos( $output, 'comments' ) )
            return $output;
    
        return esc_url( 'https://www.customurl.com/feedcustom/' );
    }
    add_action( 'feed_link', 'appthemes_custom_rss_feed', 10, 2 );

    Thanks.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    That definitely could be a potential solution. Though I can’t say for certain exactly how widespread and definite it’ll be.

    That filter will be run any time that the get_feed_link function gets used, for what it’s worth.

    Perhaps the biggest question is if it’s covering your needs specifically here. ??

    Thread Starter Matt Lovett

    (@mdeluk)

    Hi Michael

    What do you mean sorry?

    The above code is specifically to change to the main feed RSS, I am unsure on how to use this for RSS feeds for custom post types to rewrite it to be the correct URL?

    That filter will be run any time that the get_feed_link function gets used, for what it’s worth.

    What do you mean by this sorry?

    Thanks for your help.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Just saying that any time WordPress is using the get_feed_link() function, the filter code provided above will be used and adjusted.

    Not personally sure what’s coming in with the $feed parameter but I do see that the code returns the original $output untouched if it’s finding “comments” in it. That would indicate that the filter isn’t intended to change comment feeds.

    Thread Starter Matt Lovett

    (@mdeluk)

    Hi Michael

    Hmm OK. Maybe we are better off just turning off the comments RSS feed for the custom post type.

    Is this possible?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I have to believe it is, but it’s not a setting/feature we have with CPTUI itself.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom Rewrite Slug – bug’ is closed to new replies.