The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
14 views

Prevent from duplicating post/pages

I want to import posts and pages but not to duplicate them. $post_types = array('post', 'page', 'wck-meta-box'); foreach ($post_types as $post_type ) { foreach ($posts[$post_type] as $post ) { ...
0
votes
1answer
61 views

Avoid duplicate while merging two query post

I have merged two query post, but when I fetch their results, it shows duplicates. Here is the code $arg = array('post_type' => 'story','post_status' => 'publish', 'orderby' => 'date', ...
0
votes
1answer
37 views

How to use a hierarchical taxonomy in permalinks?

I use permalink: /%category%/%postname%.html and want to have categories like this: Wheels Mercedes Toyota Brakes Mercedes Toyota I want their URLs like this: ...
0
votes
0answers
43 views

Remove duplicates from foreach

I'm trying to loop through a custom post type and display all meta values for a meta key. I'm able to display all the values, however there are some duplicates. I want to remove those duplicates. I ...
0
votes
3answers
259 views

How do I check for a duplicate record before inserting using wpdb

I am inserting a row into a custom table in a wordpress database. this is the code: $wpdb->insert( 'wp_pl_my_parts', array( 'user_ID' => $user_ID, ...
0
votes
0answers
31 views

Posts Duplicating due to Pagination and Custom Query

I have a custom meta field named “price” and I would like my main query to order the posts from highest to lowest price. Currently I have it setup like this: <?php $paged = ...
1
vote
3answers
89 views

Duplicating Complete Wordpress Install for Development and then Redeployment?

What is the best way to duplicate an entire Wordpress site, including database, themes, plugins and all associated settings to another URL for development purposes, and then redeploying it back to the ...
0
votes
1answer
496 views

$wpdb->prepare with ON DUPLICATE KEY UPDATE

I just took this code from $wpdb Codex page, and modified my existing Insert query: $table = $wpdb->prefix . 'user_req'; $post_id = explode('_', $_POST['post_id']); $user_id = $_POST['user_id']; ...
1
vote
0answers
68 views

Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin

I have a wordpress table like so (phpmyadmin and MySQL) | id | meta_key | meta_value | +----+-----------+------------+ | 1 | import_id | abc | | 2 | import_id | abc | | 3 | ...
0
votes
0answers
132 views

Delete duplicate posts where meta_key is the same

I have imported some posts and this has caused some to be duplicated Each post (of a custom post type "property") should have a unique meta_key "import__id" value I need to delete all duplicate ...
1
vote
2answers
72 views

Taxonomy archive + query attachments = duplicate results

I'm trying to get the attachments of a specific term (in its archive page). But the results are showing the resulting images 5 times instead of one. I have multiple loops in this page - one to show ...
1
vote
1answer
22 views

Let me choose permalinks

I need to pick a permalink called 'mysite.com/1418', but wordpress keeps adding '-2' to the permalink. Normally this means i already have a page called the same that is in the trash or something. But ...
-2
votes
1answer
759 views

Remove duplicate images from media library.

I recently used an image importer that has duplicated all the images. They are attached to the right posts and the posts are fine (not duplicated). How do I run through my media library deleting ...
0
votes
1answer
108 views

Can't find link to add content to pages

I'm new to wordpress and I'm facing a problem. On one site I'm using wordpress v3.5.1 and I am using links in the sidebar to add content and images to several pages: As you can see on the left I ...
0
votes
1answer
30 views

How to stop Wordpress creating URLs that dont exisit

I have a website that is constantly created URLS that don't exist. For example a category section that only has 2 pages in it, for some reason is allowing the creation of other URLS - see below eg: ...
0
votes
1answer
169 views

Changing username after registration to get around the issue of having duplicate emails?

I want to change username and email after a user has been created and sent an email. This is because I want!! (yes, you read correctly) to have duplicates in my database. In normal situations this is ...
0
votes
0answers
251 views

Prevent Duplicate Attachment When Using wp_insert_post

I am trying to use wp_insert_attachment while using wp_insert_post. It's successfully creating the post and attachment. It have no problem if I only use the wp_insert_post function, but when I ...
0
votes
3answers
183 views

Updating a live theme safely?

Apologies for the general question, but I spent some time looking for an answer and couldn't find anything. I often find myself in a situation where I need to make tweaks to a live site based on a ...
0
votes
1answer
184 views

delete duplicate meta_value with same post_id

I've trying to cut down on the time to query a custom post type. After looking at the database and the wp_postmeta table, for some reason, there is some duplicate meta values for the same post_id and ...
0
votes
1answer
573 views

$wpdb->insert Giving duplicates

I'm getting duplicate entries with this, how can I fix it please? <?php echo "Month". $_POST["Month"]; global $wpdb; $wpdb->show_errors(); $wpdb->print_error(); $wpdb->insert( ...
0
votes
2answers
482 views

Wordpress Find Duplicate Post By Content

Is there any way to find similar/duplicate wordpress posts by post_content. I have tried "Find Duplicates" plugin but it takes a lot of time to search since I have more than 7000 posts in my ...
1
vote
3answers
749 views

force http canonical tag on https pages

At present all https pages have their own canonical tags referencing https, which is incorrect, they should be referencing the http versions. e.g: https://www.example.com has the following ...
1
vote
1answer
91 views

Multi row post list

I'm trying to create a 'two posts per row grid'. Here is the template i made: <div class="row"> <div class="span2"> <?php get_sidebar(); ?> </div> <div ...
0
votes
2answers
45 views

change the url in wordpress

I'm creating a wordpress website, And i have created "News" custom post type with taxonomy. My archive page URL is www.yourwebsite.com/news/ and taxonomy page URL is ...
1
vote
0answers
1k views

How to fix database error duplicate entry

At first I thought this was just a damaged table, so I tried repairing via MySQL, but it appears there's more fundamental issues. Which of the duplicates should I remove, and any further advice in ...
0
votes
3answers
254 views

2 wordpress loops showing 1 post from same post type - how to avoid showing the same post?

I got to two loops in my template files. Both querying the same thing essentially. This loop in my header: $testimonial_head = new WP_Query(array( 'posts_per_page' => 1, 'post_type' ...
0
votes
1answer
525 views

$wpdb->insert Database Error Duplicate Entry Error Logging

Is there an equivalent to INSERT IGNORE in the wpdb class? As I'm fetching and inserting a twitter feed and the field in which I store the tweet ID is keyed UNIQUE, I am aware that duplicates are ...
0
votes
1answer
122 views

Offset posts with random order

I'm trying to have five advertisement locations, each pulling posts from the same custom post type, but also loading randomly. The only problem I have with my code below is that it will sometimes ...
0
votes
1answer
455 views

Merging two wp_posts tables while avoiding duplicates

Is there a simple way to merge two wp_posts tables while avoiding duplicates?
1
vote
1answer
103 views

Multiple URLs with Numbers

I am trying to correct a problem on a Wordpress site which is producing duplicate pages in the format of: /about-us/connecticut/3/3 /about-us/connecticut/3/3 /about-us/connecticut/3/ ...
1
vote
1answer
402 views

Using Same Slug With Multiple Post Types

My Permalinks are the std %postname%. I have several custom post types, eg. 'docs'. function docs_init() { // create a new taxonomy register_taxonomy( 'docs_tax', 'docs', array( 'label' => __( ...
0
votes
1answer
194 views

update_options and unique filenames

I was able to temporarily disable an automatic task of wordpress during a specific file type upload which is nice. For instance, I changed the usual upload path for the pdf uploads by doing this: ...
2
votes
1answer
520 views

Custom Post Type Pagination & duplicate posts

I'm working on a template which will use some custom-post-types & custom-taxonomies.. I'm having problems with pagination and duplicate posts. HOME.PHP LOOP #1 On the homepage (home.php) I have ...
0
votes
1answer
1k views

Removing duplicate values between two wordpress queries

I'm addressing a well known issue in Wordpress, in which I want to display "featured" posts, and under it the rest of the posts. I have a $query1 which holds 2 featured posts, and my query_posts which ...
0
votes
1answer
103 views

Duplicate posts and change category (frontend)

I am trying to create a button inside a post and, when the user clicks on it, I'd like the post to be duplicated and this new post goes to another category, is it possible? For example: I have "post ...
2
votes
1answer
825 views

Generating dynamic Tabs with multiple query post loop

I am trying to generate a dynamic tab based navigating with query post my code is like this <div class="tabbable"> <ul class="nav nav-tabs"> <?php ...
0
votes
1answer
167 views

How to avoid duplicating same meta_value?

I have "publication_year" as meta_key for some images/attachments. I want to list all meta_values inside html table, but I don't want same publication_year value to repeat, my code is: <?php $args ...
1
vote
2answers
639 views

Duplicate posts being displayed when querying Custom Fields

I have created a small segment within WordPress that records match information for League of Legends. Using up to 30 different custom fields I can store information of 30 champions picked from 3 games ...
0
votes
1answer
352 views

Alter SQL query to return posts with unique custom field value, no duplicate values

I currently have a list of posts with the custom field "Name," with several posts having the same value for "Name." I would like to retrieve a list of posts that all have unique values for "Name." ...
0
votes
1answer
1k views

Avoid WP_Query's duplicate posts with taxonomies

Given a blog featuring several categories (such as "Sport", "Nature", etc), I've then proceded to create a custom taxonomy, which allows me to show articles in certain areas of my blog with terms such ...
4
votes
4answers
3k views

What's the proper way to find and remove duplicate images from posts and the media library?

I just exported a largish WP blog from MediaTemple to PHPFog. I used the standard WordPress export and import plugins. For some unknown reason all of my media assets have been duplicated. I now have ...
1
vote
1answer
427 views

Auto-remove custom field with no value on publish

I got some plugins that auto-generates custom fields. Does anyone know how to automatically remove empty custom fields from post when I press "publish"? A check I can put in my functions.php that ...
3
votes
1answer
475 views

Real time Duplicate title check

On my website there are a lot of authors and they are all writing about italian 'scene' so sometimes it happens that two of them write the same post or use same title so what I'm looking for is a way ...
1
vote
1answer
440 views

Save both current and new version of post meta

I want to save two versions of my custom meta box data called "sidebar". I want to compare a new and old version of this data later on, so that is why I want to save a copy of the current "sidebar" to ...
5
votes
2answers
364 views

Why does get_users suddenly return duplicates?

I'm having a hard time figuring this one out. I'm running a simple users query : $args = array( 'role' => 'custom_role', 'orderby' => 'ID', 'order' => 'DESC', 'number' => ...
2
votes
2answers
165 views

Why are theme templates organized as multiple point of entry PHP files instead of reusing your theme's index.php?

I've started to develop my own theme in the past couple weeks (and extracting WP functionality here and there in the past year), and I'm finding the structure of the WP templates awful redundant. ...
0
votes
1answer
247 views

How do I duplicate a single wpmu site?

I'm looking for a method to copy a single wpmu site, pages, and content easily. I have not found any plugins that allow me to do this. My goal is to essentially have a template of pages and content ...
0
votes
3answers
1k views

Duplicate a Wordpress Install for Testing Purposes

I want to test some plugins on my Wordpress site. However, I do not want to mess anything up. Is there a way to duplicate my Wordpress site to a new directory so that I can test plugins there before I ...
0
votes
1answer
132 views

Prevent duplicate pages from being added

Im using this code to prevent duplicate post from being added but i also need to prevent duplicate pages too. Can Someone please help? function clearDuplicatePosts(){ global $wpdb; $prefix = ...
1
vote
2answers
135 views

If the only permalink setting is %postname% what happens in the case of old duplicates?

I am tempted to change my blog to be site.com/postname. I know that for new posts Wordpress is smart enough to add a unique number to them, but what about old posts that would get updated? I can run ...