Tag Info

Hot answers tagged

3

Yes, it is possible, but it is a bit of a pain. Looking at the codex page, only arguments of note are number and offset. We need these two to create our paginated pages. First, we set the $paged parameter, which is the current page: $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; Then number of comments to display: $number = 3; ...


2

comments_number() echo's the number of comments, while get_comments_number() returns the number of comments as a string, so what you are likely looking for is get_comments_number instead of comments_number, like echo '<ul>'; while ( $query->have_posts() ) { $query->the_post(); $title = get_the_title(); echo '<li>' . $title . ...


1

I'm not quite sure what you want to do as frankly, your terminology is a bit scrambled, and you example shortcode is also quite a mess. Before I start, you should start of by checking the following very important links Shortcode API WP_Query You should first start of by defining your attributes (and their defaults) which you need to use and pass to the ...



Only top voted, non community-wiki answers of a minimum length are eligible