183 posts
  • Exclusive Author
  • Has been a member for 4-5 years
  • South Africa
modernworldweb says

hi im using a WP image slider plugin – s3 slider – and it seems i have to put the code in the template index file – but this is not where i want to put it – because it means that it will appear on the blog posts page… I have created a page and made it the static front page and this is where i want to put the php code for the image slider…. how do i do this? Im still getting to know a bit of php but not much. do i have to put the code in the page file and create an if statement? My static front page is called ‘home’ – please help.

this is the code for the slider:

<?php if (function_exists(s3slider_show())) { s3slider_show(); } ?>

Your help is greatly appreciated. :)

2322 posts
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
+1 more
CreativeMilk says

Just put the line of code in your page.php(or if you want to use a page template) and set this in your (goto) settings->reading-> A static page ->Front page: select the one that you want to use.

The line that you have/will use is already an if statement ;) So copy past it in to the page.php and it should work.

68 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 50 000 and 100 000 dollars
  • Europe
WebinCode says

Hi! if you want to show only in your homepage or front page use tags “is_home” or “is_front_page” see this article http://codex.wordpress.org/Conditional_Tags

428 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Bought between 50 and 99 items
  • Referred between 1000 and 1999 users
  • Europe
  • Sold between 10 000 and 50 000 dollars
  • Envato Studio (Microlancer) Beta Tester
readactor says
or you can use a conditional in your index to show it just on “homepage”.
<?php if (function_exists(s3slider_show()))  
and is_home() ) { 
s3slider_show(); } ?>
2322 posts
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
+1 more
CreativeMilk says
or you can use a conditional in your index to show it just on “homepage”.
<?php if (function_exists(s3slider_show()))  
and is_home() ) { 
s3slider_show(); } ?>

Damm i forgot to mention this ;)

183 posts
  • Exclusive Author
  • Has been a member for 4-5 years
  • South Africa
modernworldweb says
or you can use a conditional in your index to show it just on “homepage”.
<?php if (function_exists(s3slider_show()))  
and is_home() ) { 
s3slider_show(); } ?>

hi thanks for this, but its not working…. the part ‘is_home’ – is it case sensitive? My front page is ‘Home’ ....

Sorry if this is a silly question, really appreciate your help.

183 posts
  • Exclusive Author
  • Has been a member for 4-5 years
  • South Africa
modernworldweb says

okay, this is still not working…. do i have to put this code in the index.php file or the page.php file?

183 posts
  • Exclusive Author
  • Has been a member for 4-5 years
  • South Africa
modernworldweb says

OK GUYS !!! i got it working! i had to put the code in the page.php file and not index.php

You guys are great!!! I’d buy you all pizza! :D

428 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Bought between 50 and 99 items
  • Referred between 1000 and 1999 users
  • Europe
  • Sold between 10 000 and 50 000 dollars
  • Envato Studio (Microlancer) Beta Tester
readactor says

the code is working and for index.php, but you are using now a static page as your first page (page.php)

183 posts
  • Exclusive Author
  • Has been a member for 4-5 years
  • South Africa
modernworldweb says

hey people i could use your help again :)

while its working now – the slider displays on ALL PAGES except the blog page…. i only want the slider to display on the static page that i have made the front page (home)....

any help?

by
by
by
by
by
by