May 4, 2011

cyberseo php script help: if custom field or xml tag is 'this' add to 'this' category? | CyberSEO Pro | Support Forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
cyberseo php script help: if custom field or xml tag is 'this' add to 'this' category?
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
December 19, 2021
6:28 am
Avatar
mail.clhmedia
New Member
Members
Forum Posts: 1
Member Since:
December 17, 2021
sp_UserOfflineSmall Offline

hi, i’m trying to see if someone could help me or point me in the right direction to add a php script variable for posts retrieved from cyberseo pro plugin. im working on a group site for a non-profit to combine rss feeds from multiple shelters into one page. their feeds are each bulk with all animals included without a way to filter them into categories in wordpress. is there a way to add rule in the PHP code field where if a certain value is in a custom field or xml tag it will insert the post into a certain category in wordress? so if ‘AnimalType’ = Dog the imported post will insert into ‘Dog’ category? i can run taxonomy queries to get posts with that custom field value but trying to find a way to have these inserted into categories for compatibility for other plugin. the feeds contain dogs, cats, bunnies, etc and there isnt a way to filter the rss url to just retrieve dogs or cats from the url structure. any help would be greatly appreciated, thanks!

December 19, 2021
12:06 pm
Avatar
CyberSEO
Admin
Forum Posts: 3672
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Sure. Just add the following lines into your Advanced->PHP box:

Login to see the code

So all posts that have the following XML tag will go to the “Dog” category.

Login to see the code

If you replace $post[‘categories’][] with $post[‘tags_input’][] (or just add that line below), the post also will be tagged as “Dog”.

Also you may use this code to sort all animal types by categories:

Login to see the code

Please read the Login to see this link. Also there are many good examples right in this forum. CyberSEO Pro is a professional plugin, that’s not a marketing trick. Course it can do a lot of things right out of the box and can be used even by a total newbie, but if someone learns it in deep, he will be able to do real magic.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 64

Freedom: 61

MediFormatica: 49

B8europe: 47

saviulisse67: 45

Member Stats:

Guest Posters: 338

Members: 2633

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1534

Posts: 7747

Newest Members:

t.schleiser, worldnetsites, janodamek, socialbiz4themasses, suren.manvelyan.sv, Darick

Administrators: CyberSEO: 3672