Skip Navigation

[Resolved] Setting up RSS with Toolset Layouts 2.3.1

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to Set up RSS with Toolset Layouts 2.3.1

Solution:

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/setting-up-rss-with-toolset-layouts-2-3-1/#post-916112

Relevant Documentation:

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 13 replies, has 2 voices.

Last updated by tomS-10 6 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#915602

Since Toolset Layouts 2.3.1 is out. Do you have a fix for the RSS feed problem? Do you have a step-by-step guide for this problem?

Its regarding my custom post types which I need to make a RSS feed for. The custom post type is named artikkel, og the RSS feed should be linked here: hidden link

I been questioning this earler: https://toolset.com/forums/topic/rss-feed-linked-to-custom-post-type/

Looking for your help again, thank you.

#915620

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - Yes, I can see that the fix is proposed with Layout 2.3.1 and its published. Could you please check with Layout 2.3.1 and try to resolve your issue.

#915872

Thank you Minesh. Yes, I was wondering on how I could find this in Layouts 3.2.1. A step-by-step guide maybe? Thank you,

#916112

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please try to follow the following steps and let me know if it works for you.

1. Set up a Custom post type and create at least one post in it
2. Create a WordPress archive for this Custom post type
3. Check the Archive on the Front-end, by adding /feed at the end of your URL.
==> You will see a fine output of RSS Feed.
4. Create a Layout, and assign it to the Custom post type archive and add the wordpress archive you created above as cell
==> check /feed output again, it should be the same as before

could you please confirm it works for you.

#916118

Thank you. I found it using /feed instead of /rss. I will contact the developer to see if the feed is valid, and close this post if it`s valid.

#916124

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok fine - thank you.

#916133

Turns out there is a specific category that should not be in the RSS-feed. Until then they are unable to test it. Is it possible to hide posts that are in one category?

I have tried the following:

function exclude_category($query) {
    if ( $query->is_feed ) {
        $query->set('cat', '-65');
    }
return $query;
}
add_filter('pre_get_posts', 'exclude_category');

But turns out it does not work.

Any ideas?

#916136

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - if you can tell me what is your feed URL and which category you want to exclude I will try it out.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#916159

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now.

I've adjust the code in your functions.php file as given under:

function exclude_category($query) {
    if ( $query->is_feed() ) {
		
	$taxquery = array(
        array(
            'taxonomy' => 'category',
            'field' => 'slug',
            'terms' => array('annonsorinnhold'),
            'operator'=> 'NOT IN'
        )
    );

    $query->set( 'tax_query', $taxquery );
		
       
    }
return $query;
}
add_filter('pre_get_posts', 'exclude_category');

Could you please confirm it works at your end as desired.

#916166

Thank you very much,

Is there a place where I can change the ID of the category that is being excluded? We need to change it a more used category to test it out.

#916168

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - with the following function:

function exclude_category($query) {
    if ( $query->is_feed() ) {
         
    $taxquery = array(
        array(
            'taxonomy' => 'category',
            'field' => 'slug',
            'terms' => array('annonsorinnhold'),
            'operator'=> 'NOT IN'
        )
    );
 
    $query->set( 'tax_query', $taxquery );
         
        
    }
return $query;
}
add_filter('pre_get_posts', 'exclude_category');

You should replace the your taxonomy term slug instead of ID. For now its set to exclude 'annonsorinnhold' term - if you want to exclude another term, just replace the term slug with 'annonsorinnhold'.

Sounds good?

#916172

Oh, I am so sorry. I missed where it stood the term name. There alot of going on at the moment and trying to do several things at the same time. I am sorry.

I tried out with replacing the term into "samferdsel" and opened a new browser with refreshed cookies and it works. So thank you, solved the problem.

#916174

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Glad to know the solution I shared works as per your expectations. Would you mind to resolve the ticket with happy face 🙂

#916178

Thank you 🙂