2:35 pm
August 26, 2013
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?
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
But I don’t think it’s good idea to do it. The bug will be fixed in the next release and you won’t need any custom code to make it working as expected. I mean your “Custom PHP code” box should be empty for the following dump settings:
Login to see the quote
10:32 pm
August 26, 2013
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
Most Users Ever Online: 541
Currently Online:
7 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: 2603
Moderators: 0
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 1519
Posts: 7668
Newest Members:
FDJEZ, test.test, david_alija, paypal.orasmarketing, brad.lee.coates, Thatcham Town RadioAdministrators: CyberSEO: 3636