Skip Navigation

[Resolved] how to protect specific fields from being included in rss feeds?

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 9 replies, has 2 voices.

Last updated by Minesh 1 year, 4 months ago.

Assisted by: Minesh.

Author
Posts
#2628357

Tell us what you are trying to do? protect fields created for internal use from being published to rss feeds

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2628585

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Toolset Types plugin does not offer a way to directly modify RSS feed information but here is the related ticket that includes some information about customizing RSS feeds you might find helpful:
- https://toolset.com/forums/topic/how-to-get-an-rss-feed-from-custom-post-type-with-all-associated-fields-and-taxo/

You can access raw custom field values in PHP using the following syntax:

get_post_meta( $post_id, 'wpcf-fieldslug', true);

Or you can access the formatted field values using this syntax:

types_render_field('fieldslug', array( "id"=>$post_id, "arg1"=>"some value") );

More info:
- https://toolset.com/documentation/customizing-sites-using-php/functions/

Here's the WordPress documentation for fully customizing your site's RSS feed templates, how to remove unwanted information, etc:
- https://codex.wordpress.org/Customizing_Feeds

If you have specific questions about how to access information from Types fields, I'll be glad to answer any for you here. If this seems beyond the scope of your own coding abilities, we also have a portal where you can connect with professional developers: - https://toolset.com/contractors

#2628601

thanks - I'm not sure if this is pointing me in the right direction. I don't have an issue with creating a feed, but in hiding cpt fields from feeds: what I'm finding is that if I apply a regular wp post category to a custom post type record, that all the fields in the custom post type record are displayed in the feed. We have private fields in the records and that's fine in terms of front end display through views and blocks, because we don't output those fields. but I don't want these private fields to show up in a public facing feed. Is the only solution to not apply regular categories to a post? and does the same thing happen with toolset taxonomies?

#2628615

Minesh
Supporter

Languages: English (English )

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

There is no such feature offered by Toolset to manipulate the feeds. You will have to add your own code to remove that or try to find any suitable plugin that help you out in this matter.

#2628621

ok. and can you answer the last question?

#2628645

Minesh
Supporter

Languages: English (English )

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

Do you mean that taxonomy should not display with custom post type feed?

#2628649

if i apply a toolset taxonomy instead of wp category, will this cause all fields of record to show in feed? or is feed blind to toolset taxonomy?

#2628653

Minesh
Supporter

Languages: English (English )

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

Sorry but still its not clear what field. Are you talking about custom post field or custom taxonomy field?

Here is a brand new sandbox site where you can add your desired post type and taxonomies and run a test and let me know where with what feed and what custom fields you need help with.

You can auto-login to the sandbox site using the following link:
- hidden link

#2628667

i'm saying this:

toolst type records do not show in feed unless a worpress category is applied. in which case all fields from the record are visible in feed.

question is whether using a toolset taxonomy instead wiill have the same result.

#2629627

Minesh
Supporter

Languages: English (English )

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

Here is the sandbox site and you can auto-login to it using the following link:
- hidden link

I've created "book" post type and following custom field group that is having "book-title" custom field and this custom field group is set to display with "book" post type:
- hidden link

This is the book post having custom field "book-title" value setup:
- hidden link

When I load the RSS feed I do see all book posts but without custom fields (that should be expected):
- hidden link