WordPress.org

Ready to get started?Download WordPress

Forums

Multiple loop in wordpress with post type (3 posts)

  1. seravifer
    Member
    Posted 1 year ago #

    I have this code to display all post:

    http://pastie.org/5124323

    Shows the two types of post but does not work pagination. When I go to the next page shows the same post in the home page. I do not know what the problem is.

    And in the post_type "articles" category are not displayed.

  2. alieneila
    Member
    Posted 1 year ago #

    Try... Line 3

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $my_query = new WP_Query(array('post_type'=>array('post','articulos'), 'paged' => $paged));
  3. seravifer
    Member
    Posted 1 year ago #

    Very thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.