I would like to change wordpress feed url. After a little research I find this function (check below). function remove_feed( $feedname ) { global $wp_rewrite; if ( in_array( $feedname, $wp_rewrite->feeds ) ) { $wp_rewrite->feeds = array_diff( $wp_rewrite->feeds, array( $feedname ) ); } $hook = 'do_feed_' . $feedname; // Remove default function hook remove_all_actions( $hook ); add_action( $hook, $hook ); return $hook; } But I don't know how to use this function. Is there any one who can explain it?
I need to change the default rss url of my website: from example.com/feed to example.com/MyfeedName Update: what i tried so far is to create another Url feed but i need to remove firstexample.com/feed: add_action( 'init', function() { add_feed( 'secretfeed', 'do_feed_rss2' ); }); add_action( 'pre_get_posts', function( \WP_Query $q ) { if( $q->is_feed( 'secretfeed' ) ) add_filter( 'option_rss_use_excerpt', '__return_false' ); } ); do you have any idea how to just edit example.com/feed or how to delete it without losing rss functions?
I'm trying to do something and I don't seem to yield any successful results when searching neither at wordpress.org forums nor here. I would like to extend the standard RSS widget so that I can set an user/password for HTTP Authentication in order to fetch the feed items. If there is an existing solution that I'm missing and already provides this feature, any pointer will be much appreciated. Thanks.
In the default wordpress rss feed the element <pubDate> is <pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate> and gives a result of <pubDate>Tue, 12 May 2020 12:39:03 +0000</pubDate> how can i change this line to give a result of <pubDate>12/05/2020 12:39:03 +0000</pubDate> (d/m/Y) or <pubDate>12-05-2020 12:39:03 +0000</pubDate> (d-m-Y) but to be valid with RFC-822 ? I tried many variations <pubDate><?php echo mysql2date('r', get_the_time('Y-m-d H:i:s')); ?></pubDate> or <pubDate><?php echo get_post_time( 'd/m/Y …
I would like to know if it is possible to have a custom feed based on a page template and how? This is my custom query: $my_custom_query = new WP_Query( array('cat' => array (4335, 12488), 'posts_type' => 'post', 'showposts' => 35, 'paged' => $paged, 'meta_key' => 'views', 'orderby'=> 'meta_value', 'order' => 'desc', //'orderby' => 'desc', // BOF EXCLUDES POSTS YOUNGER THEN TODAY -30 DAYS * 'date_query' => array( 'column' => 'post_date', //'after' => '2010-01-01', //'before' => date('Y-m-d', strtotime('-30 days')) ), …
I have a site that displays manual excerpts on the blog post page: https://teralynnchilds.com/blog. I added a custom read more link using the snippet found here: https://wpmayor.com/add-read-link-manual-excerpts/ The RSS feed (https://teralynnchilds.com/feed) includes the manual excerpt, the custom read more link, AND a default read more link of "keep reading TITLE at SITE". I am trying to remove that default read more link from the feed but cannot find the source anywhere. How do I fix it some my feed only …
We have a custom RSS in our web. It works normally on Main page and post - https://www.kryptonovinky.cz/feed/spotify But in categories and tags it does not work https://www.kryptonovinky.cz/category/podcasty/feed/spotify redirect to https://www.kryptonovinky.cz/category/podcasty/feed Do you have any idea how to solve it? /* This code initializes the custom RSS Feeds for your website*/ add_action('init', 'customRSS'); function customRSS(){ add_feed('spotify', 'customRSSFunc'); } /* This code seeks the template for your RSS feed */ function customRSSFunc(){ get_template_part('rss', 'spotify'); }
One news aggregator wants to have RSS feed without any links into the <description> field. So I try to use this code in functions.php to remove <a href></a> tags, but it doesn’t work. What’s wrong? How can I remove the tags but keep intact all the text? add_filter('the_content', 'my_custom_feed'); function my_custom_feed( $content ){ global $post; if ( ! is_feed() ) return $content; // Remove all shortcodes $content = strip_shortcodes( $post->post_content ); $content = strip_tags( $content ); // Remove all html …
I want to add the featured image to my RSS feed. function rss_post_thumbnail($content) { global $post; if(has_post_thumbnail($post->ID)) { $content = '<p>' . get_the_post_thumbnail($post->ID) . '</p>' . get_the_content(); } return $content; } add_filter('the_excerpt_rss', 'rss_post_thumbnail', 20, 1); add_filter('the_content_feed', 'rss_post_thumbnail', 20, 1); With this snippet the thumbnail is shown, but the content is not generated correct. It is shown with shortcodes and its not formatted... When i use the snippet below, where i remove the ordering of filters, the content is shown, but …
Have a custom post type event that needs an RSS feed (/feed/?post_type=event) but should not generate permalinks (/events/title-of-post). Problem is that the publicly_queryable argument for register_post_type enables both RSS and permalinks. 'public' => false, //private, turns off permalinks and more 'show_ui' => true, //allow edit via wp-admin 'publicly_queryable' => true, //turn on RSS for events, but (whooops!) also turns permalinks back on Is there a simple way to enable the default Wordpress RSS feed for a custom post type without …
I created my custom RSS feed using the following code: add_action( 'init', 'MyCustomRSS' ); function MyCustomRSS(){ add_feed( 'examplecomrss', 'MyCustomFeedCallback' ); } /* This code seeks the template for your RSS feed */ function MyCustomFeedCallback(){ get_template_part( 'rss', 'examplecomrss' ); // need to be in small case. } This works well, but I can't seem to disable the cache -- I'm developing the feed and need to see it refreshed when I make changes. I've tried the following: add_filter('wp_feed_cache_transient_lifetime', function() { return …
Currently all the feed URL's for our site forward to /feed/ For example: www.wgel.net/feed/rss2/ forwards to www.wgel.net/feed/ The problem is that /feed/ is ATOM format and I need to get the RSS2 format because we are trying to pull from our feed into Contstant Contact. CC says they need an RSS2 formatted feed, when I give them our current feed address the system errors out and says it's invalid. So something is causing a forward from /rss2/ that I think …
The problem: I have a custom post type "announcements" and a custom taxonomy "announcements_taxonomy". I can access the rss feed by going to http://domain.com/announcements/feed - The problem is I am can not see the categories/tags in the RSS feed. Detail: I am using Simplepie to get the feed items and show them outside of a WordPress install. Because the rss feed on my WP site does not show the categories I can not access them with Simple pies get_categories() function. …
i'm making this website using wordpress as headless and using gatsby in the front-end, i pass the information using the api I have the wordpress in a URL example ap-backend.com and the front-end in other URL which is the "main url" of my page for example ap.com For avoid people try to see and check the back end i made the follow function to redirect to my main url function redirect_website() { if ( ! is_admin() ) { wp_redirect( $main_website, …
I use the FD feedburner plugin to redirect all feeds of my self hosted WP site to Feedburner. That has worked fine until December 2013. Since then the redirection doesn't work anymore. The feed validates fine. The same is true if I subscribe the feed through the Thunderbird RSS reader: posts after 12/2013 are not showing. If I export the posts to a blank WordPress installation, Thunderbird shows all posts in the RSS feed. I'm totally stuck here. Why would …
There are loads of articles out there on how to completely disable Wordpress RSS feeds, my configuration (functions.php) is: function disable_feed() { wp_die( 'You Died' , 200 ); } add_action('do_feed', 'disable_feed', 1); add_action('do_feed_rdf', 'disable_feed', 1); add_action('do_feed_rss', 'disable_feed', 1); add_action('do_feed_rss2', 'disable_feed', 1); add_action('do_feed_atom', 'disable_feed', 1); add_action('do_feed_rss2_comments', 'disable_feed', 1); add_action('do_feed_atom_comments', 'disable_feed', 1); But instead of getting a nice-looking HTML page with the bordered content normally associated with the wp_die() function, when browsing to https://website/feed/ I'm getting this knarley page back: Anyone know …
i have a problem with my feed on wordpress that shows this message before the feed This XML file does not appear to have any style information associated with it. The document tree is shown below. https://www.rnbjunk.com/feed/ someone can let me know hot to resolve this and get back a result with a plain text feed like this https://www.tpi.it/feed/ Thank you
This snippet from the official documentations shows how to add company logo to the RSS feed: add_action( 'job_feed_item' , 'rss_add_company_logo' , 10 , 2); function rss_add_company_logo ( $company_logo ) { $company_logo = get_the_company_logo( $post_id); if ( $company_logo ) { echo '<enclosure type="image/jpeg" url="'. esc_html( $company_logo ) . '"/>'; } } I'm trying to do the same for job's location and company name values, which by default are not included in the RSS feed. I'm strugglig to write a code for …
Created a new completely custom plugin and created a new type called BlogType, and I can create blog posts inside the admin panel. Now, the question is how to set up RSS feed. I would like to not use a paid service, so I was thinking I would have to setup a cronjob and then allow users to enter their emails and every midnight I would have to post last day's RSS. <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <title>RSS …