Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rounak Kumar

    (@rounakkumar)

    I have added new version of plugin and added functionality of pagination to category_id attribute.
    I have added more attribute to shortcode for more control. you can use them now.

    Plugin Author Rounak Kumar

    (@rounakkumar)

    I have created a quick code for you.
    You can paste this code above return $content; in posts-by-shortcode-rk.php file.

    /* Show Pagination for category attribute */
    	if($pagination_attr == 'yes' && $category_id != 0){
    		
    		$args = array(
    		  'cat' => $category_id,
    		  'post_type' => 'post'
    		);
    		
    		$the_query = new WP_Query( $args );
    		$total_posts = $the_query->found_posts;
    		$total_page = ceil($total_posts/$post_per_page);
    		
    		if($total_posts > $post_per_page){
    			$content .= '<div class="pbs_rk_pagination">';
    			$content .= '<ul>';
    			
    			for($count = 1;$count<=$total_page;$count++){
    				if($_GET['offset'] == $count || (empty($_GET['offset']) && $count == 1)){
    					$content .='<li class="active"><a href="?offset='.$count.'">'.$count.'</a></li>';
    				}else{
    					$content .='<li class=""><a href="?offset='.$count.'">'.$count.'</a></li>';
    				}
    			}
    			
    			$content .= '</ul>';
    			$content .= '</div>';
    		}
    	}

    I hope it will help.

    Plugin Author Rounak Kumar

    (@rounakkumar)

    Okay, pagination will not work if category_id attribute in shortcode.
    If you want to use pagination then you have to remove category_id attribute from shortcode.
    Currently pagination will work with all attribute except category_id.
    Thank you.

    Plugin Author Rounak Kumar

    (@rounakkumar)

    Yes you can use pagination=”yes” attribute for pagination.
    Example: [show_posts_pbs_rk layout="1" no_of_post="6" ?pagination="yes"]

    in the above shortcode number of post is set to 6 and pagination is set to yes. So if number of post will greater than 6 then pagination will appear.

    Plugin Author Rounak Kumar

    (@rounakkumar)

    Hello dirk1973,
    You can add css for author like this:
    .pbs_rk_post_meta_author a {
    text-transform: uppercase !important;
    color: red !important;
    }
    .pbs_rk_post_meta_author a:hover {
    text-transform: uppercase !important;
    color: blue !important;
    }

    you can add your custom css in themes customize -> additional css.

    can you maybe add something to change the date format?
    I will try to add this function in next version.

    Is it possible to show more than one category without using two shortcodes?
    Currently this type of functionality not available in the plugin. I will try to cover in the next version of plugin.

    • This reply was modified 2 years, 2 months ago by Rounak Kumar.
    Plugin Author Rounak Kumar

    (@rounakkumar)

    Thank you for using the plugin.

    Plugin Author Rounak Kumar

    (@rounakkumar)

    Hello bhagwad,
    Currently this type of attribute is not available in the plugin. We will create it in the next version.
    For now you can create a separate category and assign your post to that category. And use post by category attribute to show single post.

    [show_posts_pbs_rk layout="1" category_id="5"]

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