Multiple post back-to-back display only one gallery

Hourray : find it : do_shortcode do the trick ! here is the final code : // ——————————————————————————————————————– //Add a ShorCode to get a page/post content add_shortcode (‘post_cat3′,’get_post_cat3’); function get_post_cat3 ($att) { $query = new WP_Query( ‘cat=36’ ); if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); $aaa .= ‘<p>————</p>’.do_shortcode(get_the_content()); endwhile; endif; return do_shortcode($aaa); }

Unable to get posts with category on my page

add in standard WordPress post specific template tags here eg. the_title(), the_permalink, the_content, the_excerpt etc. endforeach; Like that comments says, call the function you need to display the title. The category argument appears to represent the category ID, not the slug. Try using category_name instead. [php] $myposts = new WP_Query(‘posts_per_page=5&category_name=basics’); while($myposts->have_posts()): $myposts->the_post(); // your output … Read more

The loop: more posts than I want to fit on one page

You’re looking for one of two things: either paginate_links(), or the combination of next_posts_link() and previous_posts_link(). Both of these functions allow for “pagination”, or the ability to place links to more content than you’re displaying in a screenful. Google does this on the bottom of most pages, for example. Of the two methods I mentioned … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)