Title: Allowing posts-per-page on shortcode?
Last modified: August 20, 2016

---

# Allowing posts-per-page on shortcode?

 *  Resolved [Shay](https://wordpress.org/support/users/shaypessah/)
 * (@shaypessah)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/allowing-posts-per-page-on-shortcode/)
 * Is there a way to allow for posts_per_page or show_posts within the shortcode
   of the content block?
 * [http://wordpress.org/extend/plugins/custom-post-widget/](http://wordpress.org/extend/plugins/custom-post-widget/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Johan van der Wijk](https://wordpress.org/support/users/vanderwijk/)
 * (@vanderwijk)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/allowing-posts-per-page-on-shortcode/#post-3486136)
 * Hi Shay, I’m sorry but I don’t quite understand your question. Could you maybe
   give an example of what you are trying to achieve exactly?
 *  Plugin Author [Johan van der Wijk](https://wordpress.org/support/users/vanderwijk/)
 * (@vanderwijk)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/allowing-posts-per-page-on-shortcode/#post-3486211)
 * No response for two weeks; closing this issue.
 *  [venkatvicky](https://wordpress.org/support/users/venkatvicky/)
 * (@venkatvicky)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/allowing-posts-per-page-on-shortcode/#post-3486265)
 * hi i have custom post type called videos, i have added 10 videos and displayed
   using dis code`<?php
    if(is_page(‘VIDEOS’)) { $args = array( ‘post_type’ => ‘
   video’, ‘posts_per_page’ => 10 ,’post_status’=> ‘publish’); $loop = new WP_Query(
   $args ); while ( $loop->have_posts() ) : $loop->the_post(); echo ‘ <div class
   =”block1″>’; echo'<div class=”wh_image”>’; the_content(); echo “</div>”; echo‘
   <div class=”wh_discpt”>’; echo ‘<div class=”date”>’; echo “<h3>Date Posted: </
   h3>”; echo “<h2>”.date(‘l F d,Y’,get_post_meta($post->ID, ‘wpcf-date’, ‘true’));
   echo “</h2>”; echo ‘</div>’;
 *  get_post_meta($post->ID,’wpcf-video’,’true’);
    echo ““;
 *  echo get_post_meta($post->ID,’wpcf-description’,’true’);
    echo ‘</div>’; echo‘
   </div>’; endwhile;} ?>’. so the problem is, how can i display particular video
   when i click on read more button. that means when i click on particular video
   it should show on another page

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Allowing posts-per-page on shortcode?’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-widget/assets/icon.svg?rev=2884166)
 * [Content Blocks (Custom Post Widget)](https://wordpress.org/plugins/custom-post-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-widget/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [venkatvicky](https://wordpress.org/support/users/venkatvicky/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/allowing-posts-per-page-on-shortcode/#post-3486265)
 * Status: resolved