Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #2336

    Is there any way to include pages in the home page slider? Not just blogs and or blog specific categories?

    If not what about adding a custom link to a different page for a slider image? Any clues?



    You can change the homepage slider to use pages by modifying the WP_Query in index.php. Open it up and find this code:

    $additional_loop = new WP_Query("cat=".$k_option['mainpage']['feature_cats_final']."&posts_per_page=".$k_option['mainpage']['feature_count']);

    Change it to:

    $args = array(
    'post__in' => array('595', '33', '44')

    $additional_loop = new WP_Query($args);

    This would load pages with the ID’s of 595, 33 and 44. This would require manual intervention (i.e. editing the file) every time you wanted to change the pages / the page order. The original theme options would continue to exist but have no effect on the slider.



    Thank you, that worked perfectly.



    Awesome, let us know if you have any other questions :)



    Hi , tired the below code which should display 6 pages at the front but it displays only 3 (all of the 6 are post IDs of the pages I am trying to display at the mainpage)

    $args = array(


    ‘post__in’ => array(‘583’, ‘585’, ’66’, ’63’, ‘965’));

    $additional_loop = new WP_Query($args);

    Any ideas ???


    Maybe you’ve limited the number of maximum posts per page to 3 – check your reading settings under Settings > Reading. You can also check the mainpage post settings under Newscast options > Mainpage Options.


    @dude , yeh you are right , did had the maximum posts per page at Reading set to 3 ,

    could you suggest a work around where I can still have 3 posts at the front while showing more number of pages in the slidebar.

    It can be dome if we use category selection, but how to do using the pages ???

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

The topic ‘Include Pages in home slider’ is closed to new replies.