move blog posts from one wordpress to another

It depends on your exact situation. If there’s nothing in your new blog you can just point your new WP install at your old database (see questions on migrating) If there is content in your new WP instance and what you’re wanting to do is merge content, then do an export from the old site, … Read more

Posts are being redirected to xampp home page

Your rewrite rule is wrong. The existing rule is for when the site is at root– http://localhost. You site is at http://localhost/highimpact. The final rewrite rule should, I believe, RewriteRule . /highimpact/index.php [L]. If you go to wp-admin->Permalinks, and save the settings WordPress will rewrite the rules or tell you what the rules need to … Read more

How can I hide the sidebar from a specific post?

Here’s an idea I mentioned on Twitter. function special_post_template( $template ) { // Identify a single query for the special post if ( is_single() && 10 == get_the_ID() ) $template = get_template_directory() . ‘/special-single.php’; return $template; } add_filter( ‘template_include’, ‘special_post_template’ );

wp query with dynamic taxonomies and terms?

Here is one idea for a dynamic multiple taxonomy query: // construct the tax-query: $tax_query = array( ‘relation’ => ‘AND’ ); // check if movie_genre taxonomy is to be included if( $bMovieGenre ){ $tax_query[] = array( ‘taxonomy’ => ‘movie_genre’, ‘field’ => ‘slug’, ‘terms’ => array( ‘action’, ‘comedy’ ) ); } // check if actor taxonomy … Read more

How to create A-Z index listing for custom post types?

Ok, you just have to make a loop with first letter check. WordPress query will handle the post_title ASC order. EDIT : I use get_permalink() within the loop to get URL (https://developer.wordpress.org/reference/functions/get_permalink/) $series = new WP_Query(array( ‘posts_per_page’ => -1, ‘post_type’ => ‘series_type’, ‘orderby’ => ‘title’, ‘order’ => ‘asc’ )); if($series->have_posts()) { $letter=””; while($series->have_posts()) { $series->the_post(); … Read more

Styling images coming from another blog

Calling image_resize() would be difficult, since it would search for the image in your main blog’s upload directory. If it is a fixed image size I would just add it to the configuration of your photoblog, so it is created there when you upload new images (you can then rebuild your old image thumbnails). In … Read more

Query posts without a specific ID

Most of the things you can do with a query are described in the Codex page for WP_Query You need to use the ‘post__not_in’ parameter eg: $args = array( ‘post__not_in’ => array(’34’,’54’), // post ids ‘post_type’ => ‘page’ );`

How Can i Get 5 Recent Post Title With Corresponding Link?

This sounds like an additional Loop on that page, right? You might want to use: <ul> <?php $posts_query = new WP_Query(‘posts_per_page=5’); while ($posts_query->have_posts()) : $posts_query->the_post(); ?> <li><a href=”https://wordpress.stackexchange.com/questions/20489/<?php the_permalink(); ?>”><?php the_title(); ?></a></li> <?php endwhile; wp_reset_query(); ?> </ul> Also read more here: http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action