specific posts (by ID) on presentation page

  • Author
    Posts
  • #30619
    fuliggians

    I want to show in the slider 10 different specific posts (PAGES) writing the ID (with comma).
    Every page has the featured image, but the slider shows me only 4 pages.

    Why?

    #30621
    fuliggians

    Solved!
    in the file: frontpage.php you need to add the counter of the slides and add to the custom_query2:

    $nirvana_slideNumber_specific = count($pieces_array);
    $custom_query2->query(array( ‘post_type’ => ‘any’ , ‘showposts’ =>$nirvana_slideNumber_specific , ‘post__in’ => $pieces_array, ‘ignore_sticky_posts’ => 1,’orderby’ => ‘post__in’ ));

    #30712
    Zed
    Cryout Creations mastermind

    Thanks for pointing this out. We’ll get it fixed as soon as possible.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #31037
    Sean

    I’m having the same issue in Tempera. The slider only shows the first post in a series of comma-delimited posts. Seems it’s not incrementing the count.

    Unfortunately, I don’t understand the code suggestions above. It looks like the code needs to be changed for both custom_query and custom_query_2. I’ve attempted to incorporate the code with no luck. While I haven’t broken the first page, I haven’t improved it, either.

    Can someone post a working code sample?

    Thanks!

    #31042
    Sean

    Thanks – I got it.

    For some reason ‘post__in’ => $pieces_array, failed to work after creating a variable for the count, so I used ‘post__in’ => explode(“,”, $tempera_slideSpecific), in the query instead of post__in’ => $pieces_array,.

    #31775
    Zed
    Cryout Creations mastermind

    This will be fixed in 1.0.6.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘specific posts (by ID) on presentation page’ is closed to new replies.