Articles of post duplication

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 class=”span4 pull-left”> <?php query_posts(‘category_name=portfolio&posts_per_page=100’); $do_not_duplicate = $post->ID;?> <?php if (have_posts()) : while (have_posts()) : the_post(); if (in_array($post->ID, $do_not_duplicate)) continue; ?> <?php the_content(); ?> <?php endwhile; else: ?> <p><?php _e(‘Sorry, this […]

Content duplication issue with dynamic URLs

My WordPress blog creates many dynamic URLs, which creates a content duplication issue for my website. As each page gets a different live URL, it’s being considered as a duplicate page. Why are dynamic URLs getting indexed and creating this content duplication issue? Example 01: example.com/travel/lorem-ipsum-dolar example.com/travel/tag/lorem-ipsum-dolar Example 02: example.com/travel/lorem-ipsum-dolar example.com/travel/tag/lorem-ipsum-dolar?view=session_id=1013

Best way to prevent post duplication when using multiple loops

I have the following loops on a page on my website. Whats the best way to adapt the code below to stop the post in my first loop, being repeated in the second? <?php query_posts(‘showposts=1&post_type=post’); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id=”latestpost” <?php if ( $thumbnail_id […]

wp_reset_query equivalent for WP Ecommerce

I’m having product duplication issues while running two loops on a single page. Is there an equivalent to wp_reset_query for wp ecommerce? You can see the site at http://standingarmed.com/products-page You can see the loop here since it didn’t format properly on the page. As you can see I set a variable to grab the first […]

How to prevent duplicate posts with wp_insert_post on single.php?

I’m getting a really strange bug (WP 3.1.3). My goal is to have users create a new post simply by landing on a single post. In order to make that happen, I have the following code in my single.php: <?php //– Set up post values $myPost = array( ‘post_status’ => ‘publish’, ‘post_type’ => ‘post’, ‘post_author’ […]

WordPress Network (MU): Copy Main Site to Sub-Site

I would like to copy all the posts, users, and pages from my main site into a sub site. I’ve tried exporting and importing, but the main site has thousands of entries and hundreds of users, and the import seems to fail at around 250 posts without an error. Any ideas for the migration would […]

Custom post type and taxonomy – show related posts

I have a Projects custom post type with a custom taxonomy of Services. Each project can have multiple services ticked. On the project page I am using the following code to pull back related projects <?php //for in the loop, display all “content”, regardless of post_type, //that have the same custom taxonomy (e.g. genre) terms […]

Ajax loading duplicate post

I wanna start by apologize for this post being so long, but I feel it may help others since I am having this problem and figured I might as well be as detailed as possible. I am having a problem with this is the loop.php file loading the same post multiple times and I have […]

How-to Change Content with location change?

I have to develop a site using wordpress having thousands of pages. Pages will have the same content but there will be change in the location of the content. For example location will be Sydney, Melbourne etc. Is there any way that I can manage the virtual pages? The pages has to be indexed in […]

How to append unique numbers to new duplicated post titles/urls?

As of now if you create two (2) posts with the same title you get the following: domain.com/test/ domain.com/test-2/ If you create a third post, you then get another url like: domain.com/test-3/ I am working on a directory, so the odds of someone having the same name is pretty good; therefore I want to append […]