query_post or single-[cpt].php?
Try refreshing your permalinks. That is, simply visit your settings -> permalinks page. Then check single-listing.php again. WordPress may need nudging to pay attention to your new file.
Try refreshing your permalinks. That is, simply visit your settings -> permalinks page. Then check single-listing.php again. WordPress may need nudging to pay attention to your new file.
Try this code here <?php $paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1; if($paged == 1){ $posts_per_page = 100; }else{ $posts_per_page = 300; } query_posts( array( ‘posts_per_page’ => $posts_per_page, ‘post_type’ => array( ‘regularproducts’, ‘wpsc-product’ ), ‘paged’ => $paged, )); ?>
In WP_Query(), there is no category reference passed so this is the point which returns all category post. Please try with passing category ID here: $the_query = new WP_Query(array( ‘cat’=4, //Your category ID ‘posts_per_page’ => -1, ‘meta_key’ => ‘adult_price’, ‘orderby’=> ‘meta_value_num’, ‘order’ => ‘ASC’ )); OR $the_query = new WP_Query(array( ‘category_name’=staff, //Your category name… ‘posts_per_page’ … Read more
Use below code please, this will work. <a href=”https://wordpress.stackexchange.com/questions/223417/<?php the_permalink(); ?>”>read more..</a> or <?php the_content( __( ‘more <span class=”meta-nav”>…</span>’, ‘themename’ ) ); ?>
I guess you don’t need to target a taxonomy. You can use the code below: function query_change_function( $query ) { $query->set( ‘posts_per_page’, 5 ); } add_action(‘pre_get_posts’, ‘query_change_function’); You should wrap the $query->set( ‘posts_per_page’, 5 ); around with if ( ! is_admin() && is_home() ) {//the $query->set code} to avoid it changing to 5-posts everywhere.
http://wordpress.org/extend/plugins/tags/author http://wordpress.org/extend/plugins/author-info-widget/ http://wordpress.org/extend/plugins/author-bio/ http://wordpress.org/extend/plugins/author-exposed/ Or you can use your own custom solution
Here is a very crude script I’ve knocked up to get what you are after: <?php require(‘wp-blog-header.php’); $posts = get_posts(‘numberposts=-1&order=ASC’); $posts_times = array(); foreach ($posts as $post) { $post_time = strtotime($post->post_date); $offset = $post_time % (60*60*24); $post_time -= $offset; $posts_times[$post_time]++; } $keys = array_keys($posts_times); $running_count = 0; $end_data = array(); for($i = $keys[0]; $i <= … Read more
This is pretty easy. //Include this above your loop $i = 0; //Counter if(have_posts())while(have_posts())the_post(); //include this in your loop $i++; if($i <= 5) echo “<img src=”http://urltoinewimage” alt=”Image Title” />”; //Stop including in your loop the_title(); the_content(); endwhile; else: endif;
I’m going to answer this anyway because i’ve already narrowed down the source of your problem and it’s not a Javascript one. I have AdblockPlus installed in Firefox so i went through your scripts blocking them in chunks at a time until i was down to just the PUT scripts, and the problem was still … Read more
Assuming you’ve already got your HTML/CSS whipped up, you will need two separate custom queries. Here’s one, a here is documentation. // Custom Query parameters. This one grabs most recent 5 posts from category with ID 9 // For each loop, change “$the_query” variable to something unique $the_query = new WP_Query( ‘cat=9&posts_per_page=5’ ); // Begin … Read more