I can have the RSS feed url like:
http://www.mydomain.com/?post_type=job_listing&job_cat=value#1&job_type=value#2&geo_country=value#3&feed=rss2
job_cat
& job_type
are taxonomies for the job_listing
post type and they are considered / generated in the RSS feeds correctly.
Recently I’ve added a custom field parameter in te RSS feed url’s called geo_country
. If a value is returned for this in the RSS feed url (not empty), then the RSS content should be filtered also by the custom field’s value. Which is not happening currently, of course.
Using the Jobbroller
theme, but I haven’t found in them any RSS related code, function(s).
Is there any way to write a hook in the described scenario?
You can try to add
geo_country
as an extra query variable with:and then setup a
pre_get_posts
hook to filter your feed according to thegeo_country
value:I assume
geo_country
takes only alpha-numeric values(a-z,A-Z,0-9)
, just let me know if that’s not the case.This works on my install with the Twenty Twelve theme.