August 14, 2010 at 8:01 am #690
I absolutely enjoy this support forum, it helped me a lot. Even though there are two topics about static homapages, I could not find the solution to my problem:
How would I do that? If I just set WP to display a static homepage, there is no slider….
Thanks a lot!!August 16, 2010 at 6:24 am #32524August 17, 2010 at 2:42 pm #32525
The frontpage was never designed with the slider and a static page as an option, nevertheless you can modify index.php to show a page instead of the posts.
Open up index.php and find this code:
$additional_loop = new WP_Query("cat=".$negative_cats."&paged=$paged");
change it to:
$additional_loop = new WP_Query("page_id=10");
where page_id matches the ID of the page you want to display (in the above code ’10′).August 24, 2010 at 9:31 am #32526October 14, 2010 at 10:23 am #32527
I’m also trying to achieve a static front page that keeps the slider, but I’m having some trouble getting it to work.
I’ve edited the line of code in index.php as described above. I got the page id from the URL when I chose to edit the page I want to use. Example: /wp-admin/post.php?post=32&action=edit
This results in a front page with a slider, and an error under that reading:
Sorry, no posts matched your criteria”
Have I got the wrong page ID?
Appreciate your help!October 28, 2010 at 4:08 pm #32528
Hi I’m having the same problem as Boomsite.
I found the code and replaced it but it still wont show up on a static homepage. For this I tried a couple diffrent things I tried it with the settings in settings – reading to a static homepage and the same one I wanted, as well as tried leave it with out this setting on.
The static homepage will show up but my accordian slider wont. when you say page ID is 10. what do you mean by this, the title or the page order (of which i tried both), I also tried chainging the 10 in the index.php to “index.php” or “index”. But I cant seem to find away to get it to work.December 13, 2010 at 3:25 pm #32529
I’m also having the same problem as Boomsite – need a static home page but want the slider to show too. Got SO excited when I saw the code switch above but haven’t been able to get it to work. I tried the page id and also the full absolute address to my desired page in both occurrences of “$additional_loop = new WP_Query” but still posts show on the home page rather than a static page. If I set “static page” to my desired page, I lose the slider. Please help…!!!
The topic ‘Slider + Static homepage’ is closed to new replies.