May 4, 2011

Assign categories and tags from dump file | CyberSEO Pro | Support Forums

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
Assign categories and tags from dump file
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
April 25, 2022
2:35 pm
Avatar
Member
Members
Forum Posts: 81
Member Since:
August 26, 2013
sp_userofflinesmall Offline

Hello,

I wonder if the following should work out of the box or if I am doing it wrong:

Import Dump with Categories and Tags: Categories (Dump field “Categories”) get assigned to WP Categories and Tags (Dump field “Tags”) to WP Tags. Categories should be created if not already there.

This does not work as expected. When not using any php code, categories get created yes, but tags transform also to categories.

When using “$post[‘tags_input’] = explode(‘,’, $post[‘custom_fields’][‘tags’]);”, the tags from the dump transform to tags AND categories. (I set tags->tags before)

When using “$post[‘tags_input’] = explode(‘,’, $post[‘custom_fields’][‘tags’]);” AND $post[‘categories’] = array(); tags are only tags which is correct but the only the “uncategoried” category is set, no new categories get created.

 

So what do I need to do if I want the tags from the dump file to be the WP tags and the categories to be the WP categories? I hope this is possible without heavy php code or so?

April 26, 2022
2:17 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Do you disable this option: Login to see this link.?

April 26, 2022
2:28 pm
Avatar
Member
Members
Forum Posts: 81
Member Since:
August 26, 2013
sp_userofflinesmall Offline

Yes, this is disabled

Is this something that should usually work normally with dumps? One thing I noticed, not sure if it is related, the dumps have the xml tag <category> and not <categories>

April 26, 2022
3:02 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

I think I will be unable to help w/o looking at the actual CSV file. Please send it to me by email along with the instruction on how to replicate your feed setting including your custom PHP code.

April 26, 2022
4:10 pm
Avatar
Member
Members
Forum Posts: 81
Member Since:
August 26, 2013
sp_userofflinesmall Offline

email sent

April 26, 2022
5:43 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Actually that’s a little bug in the plugin (it looks for “post_tag” instead of “post_tags”). So your code must be written like this:

Login to see the code.

April 26, 2022
10:32 pm
Avatar
Member
Members
Forum Posts: 81
Member Since:
August 26, 2013
sp_userofflinesmall Offline

Hey, just to be sure, I just want to mention the tags actually worked with the PHP snipped I had before, the categories were the problem. And using your new tags code results in only having the “uncategorized” category and no other categories or tags. Not really complaining, as I can wait until the update, just trying to help.

p.s. when deleting $post[‘categories’] = array(); and keep your new snippet it results in having the tags + categories from the dump file both as WP categories

April 27, 2022
1:56 am
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Fixed. No snippets needed in your case. Please make sure to update to the latest version.

April 27, 2022
9:59 pm
Avatar
Member
Members
Forum Posts: 81
Member Since:
August 26, 2013
sp_userofflinesmall Offline

I noticed that and it works with the categories but the tags don’t transform to “Tag1” and “Tag2”, they transform to “Tag1, Tag2”

so “Tag1, Tag2” transforms to one tag

April 28, 2022
2:05 pm
Avatar
Admin
Forum Posts: 3102
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Also fixed.

Forum Timezone: Europe/Moscow

Most Users Ever Online: 105

Currently Online:
7 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 81

Freedom: 61

B8europe: 54

saviulisse67: 45

adultdenim: 44

allgoodies: 38

Member Stats:

Guest Posters: 350

Members: 1928

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1331

Posts: 6637

Administrators: CyberSEO: 3102