The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
9 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
21 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
21 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
20 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
37 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
61 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
26 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
82 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
209 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
82 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
121 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
251 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
255 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
244 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
57 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
41 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
383 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
176 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
345 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
78 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
0answers
130 views

Avoid duplicate posts from sidebar widget on homepage?

In a normal dynamic sidebar of a theme's homepage template the sidebar widgets display lots of duplicate posts on the front page. It shows "recent posts" and posts from certain categories in main ...
0
votes
1answer
303 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
88 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
298 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
147 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: ...
1
vote
1answer
363 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
825 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
82 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
554 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
137 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 ...
0
votes
2answers
522 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
279 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
750 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 ...
3
votes
4answers
2k 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
290 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
439 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
372 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
302 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
141 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
234 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
841 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
126 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
133 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 ...