How to duplicate a wordpress user and all his/her data from custom fields?
How to duplicate a wordpress user and all his/her data from custom fields?
How to duplicate a wordpress user and all his/her data from custom fields?
You could add the additional check to your foreach loop to see if the post with exactly same slug as the one you’re about to add already exists. Kinda difficult to tell exactly what you would have to do without seeing your current code. I’m assuming you know the slug and a type of a … Read more
The first question here is why don’t you want to duplicate your pages? I would very much advise to use a plugin like PolyLang or WMPL that do exactly that. qTranslate X is a plugin that does not duplicate pages. It just copies the content of all translations into one post. https://de.wordpress.org/plugins/qtranslate-x/
Allow duplicate slugs for custom post type with taxonomies
I don’t see any problem with passing post__not_in to the query. Yeh, it might not look like a clever code, but sometimes the only way to implement some functionality is with ugly code. Regarding the VIP page… its a meh, a specific edge case which might not fit your situation (are you doing a widget … Read more
Demilio, unfortunately the WordPress API seems to assume that custom fields do not have an ’empty’ value, in the sense that update_post_meta and delete_post_meta, if given ” as the (previous) meta value perform the update/delete operation for all values for that key. This makes it difficult, for instance, if a custom field key has multiple … Read more
There’s plugin to do that – Duplicate Post While viewing a post as a logged in user, you can click on Copy to a new draft as a dropdown link under Edit Post in the admin bar. This will lead you to edit post page, change whatever you want and save. It’ll save it as … Read more
Welcome to the lions den So you’re willing to get down into the blazing furnace or the lions den and change the upload path. This is so not a good idea without investigating what is happening behind the scenes. I can’t give you a full write up, as there’s so much involved, like filters, options … Read more
Simple answer is that you can’t as far as the default wordpress installation goes. It’s a must to have unique slugs. You can however mess with the Rewrite API with some custom code to hack your way around this & there aren’t any plugins(AFAIK) to help you on your way. So it’s definitely a lot … Read more
Import the new table as wp_posts_2, then join them and delete all duplicates based on post_content; then merge the two tables. The following SQL query (untested!) should give the posts from the new table to be deleted: SELECT wp2.* FROM wp_posts_2 as wp2 LEFT JOIN wp_posts as wp ON wp2.post_content = wp.post_content WHERE wp2.post_content = … Read more