You could try out the template_redirect
action to overwrite the default feed template:
add_action( 'template_redirect', 'custom_template_redirect' );
function custom_template_redirect() {
if (!is_feed())
return;
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=" . get_option("blog_charset'), true);
// your own template stuff here
exit();
}
Related Posts:
- Aspx/Rss feed – failed to open stream: Redirection limit reached
- start_lvl Ignored in Custom walker_nav_menu
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 7146491840906359738 bytes)
- How do I make my function add variables/values to the $post object?
- How do I get the author’s page url from their ID?
- Calculate percentage of post by category
- Change comments form title on a page by page basis
- How to check from which page the user is coming to the current page?
- Get the title before comma
- Execute only on a certain page
- How do I know what variables are passed in a filter/action and what their meaning is?
- “Can’t use function return value in write context” error
- Display 4 chronological posts starting with a random post
- my function doesn’t return my post from today
- Wrap each shortcode in array to div
- Warning: array_pop() expects parameter 1 to be array, boolean given
- Replace comment avatars and links at the same time
- Check if Product is in a Specific Category in Functions.php
- Adding ads code between comments
- How to Display Image Meta underneath EVERY image in EVERY post
- get_the_terms – only top level
- Have CSS Class Added with `is_page()` WP function
- Limiting woocommerce line_total decimal length
- Run a filter when a walker runs
- Shortcode content filter?
- Swapping wp_dropdown_categories function with wp_category_checklist
- Display fields as values in array from external SQL DB
- only show container with next/prev links if they exist?
- Populate dropdown with Child Pages based on Parent Page chosen
- How can I remove a function that has been added to wordpress with add_filter?
- Get value from shortcode to do something
- PHP 8, AJAX mail form to function.php doesn’t work
- JS file work only in index page
- Error in custom php function doesn’t exist
- Custom shortcode outputs plain text instead of HTML at top of post
- how can i use $_COOKIE[] + PostID to execute the below code?
- What’s the uses of wp_cache_set() or wp_cache_add()?
- Create Page To Count Comments For Each Post In WordPress Site
- Can’t find infinite loop cause
- how to make custom ajax handler?
- Can anyone offer any help with this function?
- height should be set to auto to avoid pixelation in the post thumbnail function
- Can i put my shortcode inside a variable in php files?
- Moving code from theme header to functions.php
- Override a function defined in wp-includes/comment-template.php
- Show meta box only for default page template
- Can’t access site after making changes to the functions.php [closed]
- Best way to use a large array in function
- Setting user nickname and displayname to shortened email
- Download PDF after CF7 form submission
- ::before on open/close function [closed]
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- GET problem in WordPress
- HTML Special Characters in URL string [closed]
- Create page template via functions.php?
- Send a mail to specific address in a custom field when a new comment is made on a specific post
- CSS change in woo commerce Place Order Text [closed]
- WP All Import / Update stock quantity from multiple XML files
- child parent styles enqueue order
- Add URL parameter to all internal links using a specific theme
- Warning: call_user_func() expects parameter 1 to be a valid callback, function
- Change MySQL PDO connection to a WPDB connection
- Hide a div when a custom field is empty
- Modify WooCommerce used to get all orders in dashboard
- Can’t log in to WordPress wp-admin after adding code to functions.php
- How to change basename url for wp-admin?
- How to exclude meta no index pages from wp_list_pages
- Products listing check if meta checkbox is checked
- Search by date in WordPress
- Hide a div if the fiels is empty
- Illegal string offset checkbox
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Trying to add some custom text into WordPress Post title via function.php
- Remove all feeds and return custom 404 page
- Edit a function to take different actions based on user role
- How to put 2 php codes in functions.php without site crashing
- I got big white screen when i attach main style sheet of Html in functions.php
- Using Javascript On Page – Header and Footer Now Missing
- Add Product Permalink in woocommerce admin order page
- Unzip_file causing Media file upload error
- How do I make comment-reply-button with that takes to comment reply form on click
- How to generate customized filtered output for the gallery
- Escaping a Single Quote in str_replace for Nav Function
- Use fetch_feed(); Totally Outside of WordPress?
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Allow BBPress participant role to trash topics
- Display Year and Month from custom field + Age Calculator
- insert thumbnail image from php script
- WordPress rating by views [closed]
- Get author meta of all writers
- Trying to see if page is category or single and displaying title with appropriate heading tag
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- Fix My Custom Function: Remove Automatic
- WP Debug enabled Undefined index error in a widget
- WP Fatal error: Call to undefined function get_template_directory_uri()
- Remove default Image Sizes
- A better way to write this php function
- a problem in class in class-wp-hook.php
- change title of page dynamically
- Custom plugin doesn’t show in admin menu – when code added, displays an empty page