The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
33 views

How can I convert this SQL query to delete duplicate posts by specific meta_value instead of post_title?

This query works exactly as it should to DELETE all duplicate posts by post_title for my custom post type: $sql = " DELETE a.* FROM wp_posts AS a INNER JOIN ( SELECT ...
0
votes
0answers
21 views

Avoid Duplicate Featured posts in taxonomies pages

I have a Featured posts in my front page When I click in a taxonomy Link (year, director, actor) , the featured posts display in the TOP I want to Avoid duplicate it , and SET it in Homepage only ...
1
vote
1answer
60 views

Duplicates with WP_Query loop

I'm showing on my front page only posts with featured image. My problem is that on every next page load I receive the same results aka getting duplicates. I'm using ordering by custom field. Any ...
1
vote
1answer
96 views

Prevent duplicate post from dynamic multiple loops

I was trying to list 20 recent posts, and put a post from custom post type on every 5th item. So it's like: Post Post Post Post Post Custom Post Type Post Post Post Post Post Custom Post Type .. and ...
0
votes
0answers
23 views

Custom post type getting duplicate permalink

I'm trying to make a new custom post type as "Page" with non-based in URL like... function theme_setup(){ register_post_type('Hello',array( 'labels' => array( 'name' => ...
0
votes
0answers
52 views

Some posts appear in duplicate with paginated query

I'm querying a custom post type with some custom post meta, and then output the results. This is the query: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $properties_query = array( ...
0
votes
1answer
25 views

how to find duplicated permalinks?

I've got a duplicated permalink somewhere, so I can't name the new one like that. Normally, I simply check the other posts, categories, media, even on the thrash. But this time I can't find any ...
0
votes
1answer
123 views

Checking if the data already exsis in the wp database - custom plugin

I'm trying to insert a user input to a custom table in wp and I don't want to have a duplicate entries. So my code to check that is: global $wpdb; $tablename=$wpdb->prefix."students"; ...
0
votes
1answer
20 views

Duplicate pages with ?s parameter

I scanned my website with a duplicate content scanner tool, and it gives me lots of duplicate content pages with ?s parameter at the end, which are crawled by Google. How can I remove these pages? ...
0
votes
1answer
48 views

Disable image rename on upload

When I upload an image (test.jpg) with the Media manager it creates the same image with a digit after its name (test1.jpg). I disabled image cropping so files like test-[width]x[height].jpg don't ...
0
votes
0answers
34 views

Duplicate Button on Attachment Details Modal

I tried to find a solution, but no success. I need to add duplicate button on the bottom of Attachment Details Modal Window ( where are "View attachment page | Edit more details | Delete Permanently" ...
1
vote
1answer
64 views

Problem:Save Several Duplicate posts in The Database and then Error nesting level of '100' reached

I have a function to insert a single post in the database. But when I run the function, duplicate posts (40) are added to the database and then an error is displayed. Fatal error: Maximum ...
-1
votes
1answer
204 views

prevent duplicate comments using wp_insert_comment

i am trying to import facebook comments to wordpress what iam doing is get the graph of the facebook post Comments, json decode it then i import the comment via this code so my code so far is ...
0
votes
0answers
20 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
189 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
45 views

hierarchical taxonomy in permalinks? using same slug

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
92 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
760 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, ...
1
vote
3answers
116 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
941 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
1answer
130 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 | ...
1
vote
2answers
108 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
1k 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
148 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
35 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
240 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
328 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
252 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
217 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
893 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
722 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
1k 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
121 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
49 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
2k 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
300 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
741 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
156 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
655 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
108 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
510 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' => __( ...
1
vote
1answer
229 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
614 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
117 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
1k 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
199 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
763 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
371 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." ...