[Resolved] feed not updating with generatepress theme

Home Forums Support [Resolved] feed not updating with generatepress theme

Home Forums Support feed not updating with generatepress theme

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #934836
    dassana

    hi tom

    some days back i checked the feed url (link given below) and it is not getting updated with the recent posts. the feed is a valid feed but is showing posts dated 4 to 9 years back. after testing with various things, today i changed the theme to wordpress default theme (twenty nineteen) and the feed was updated to the latest posts.

    i reverted back again to generatepress and the feed url changed back to posts dated 4 to 9 years ago. i have not added any code related to feed in generatepress theme. the posts in the feed are also displayed in order with the maximum comments first. i am using generatepress child theme. kindly let me know what is causing this issue.

    #935193
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    The theme itself doesn’t have any control over the RSS feed. For example, you can see ours here on this site working: https://generatepress.com/feed/

    Are you using a child theme? If so, maybe you have a function in the child theme causing the conflict?

    #935306
    dassana

    i am using child theme as i have mentioned above. i removed all the codes from child theme and checked. the rss feed still shows the old posts. then i switched to generatepress theme and checked. no difference in the rss feed. the old posts are still getting displayed.

    so there is no function conflict in the child theme as i removed codes from all the files in the child theme and checked. probably something wrong with the generatepress theme.

    #936017
    Tom
    Lead Developer
    Lead Developer

    If it was the theme, our RSS feed I linked to would also be broken.

    Do you have any other custom functions on the site? What happens if you deactivate all of your plugins?

    #938493
    dassana

    i had already deactivated all the plugins before stumbling upon the theme issue. there is no conflict with any plugin.

    i have also not made any changes in the parent theme. there are custom functions on the site and i deactivated them all and checked. no difference in the rss feed.

    #938683
    Tom
    Lead Developer
    Lead Developer

    Hmm, I’ve tried to find this issue on one of our sites, but I can’t. All of our feeds are working properly.

    Can you try re-installing the theme?

    #938717
    dassana

    i re-installed the theme and no changes in the feed. i deactivated all the plugins again and just to check and the rss feed remained the same. not sure what is causing this problem.

    #938724
    Tom
    Lead Developer
    Lead Developer

    I wonder if any of these might help?: https://wordpress.org/support/topic-tag/feed-not-updating/

    There might be something in there that makes you go “aha”?

    If not, can you share any custom code you’re using?

    #938727
    dassana

    will do. its night time here now. so i will check the link and if nothing works then will send the custom code by tomorrow. thanks a lot tom.

    #938730
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

    #939351
    dassana

    hi tom

    i checked the link and removed white spaces from the functions.php file. disabled the plugins again. updated wordpress also. no change in rss feed.

    i also removed the codes from functions.php file one by one to check. the rss feed was the same. i will email you the code as there are many codes.

    regards
    dassana

    #939732
    Tom
    Lead Developer
    Lead Developer

    What if you remove this function?:

    function wpex_order_category( $query ) {
    	// exit out if it's the admin or it isn't the main query
    	if ( is_admin() || ! $query->is_main_query() || ($query->is_search) ) {
    		return;
    	}
    	// order category archives by title in ascending order
    	if ( is_category() || (is_tag)) {
    		$query->set( 'order' , 'dsc' );
    		$query->set( 'orderby', 'comment_count');
    		return;
    	}
    }
    add_action( 'pre_get_posts', 'wpex_order_category', 1 );
    #939742
    dassana

    hi tom, you are a genius. i removed this code and the feed is working now. i had removed all the codes at once a couple of times, but did not work.

    what is the function in this code that is causing the conflict?

    thank you very much.

    #940004
    Tom
    Lead Developer
    Lead Developer

    You could try this instead:

    function wpex_order_category( $query ) {
    	// exit out if it's the admin or it isn't the main query
    	if ( is_admin() || ! $query->is_main_query() || $query->is_search || $query->is_feed ) {
    		return;
    	}
    	// order category archives by title in ascending order
    	if ( is_category() || (is_tag)) {
    		$query->set( 'order' , 'dsc' );
    		$query->set( 'orderby', 'comment_count');
    		return;
    	}
    }
    add_action( 'pre_get_posts', 'wpex_order_category', 1 );
    #940513
    dassana

    thank you so much tom. this code worked great. i saw the changes you have made and just one code related to the feed made a difference. thanks again.

    i have one more query. if i use google fonts from the customizer option, does the page load the font from the google fonts repository or do they load from the server. are the fonts already existing in the theme or is it that they are downloaded from the google fonts repository.

    on a side note, in a couple of days, i shall send a donation as a thanksgiving gesture and for helping me so many times. i wish you all the best.

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