183 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in 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. :)

2330 posts
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Helped several times protecting Envato Market against copyright violations
+6 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
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 5 years
+2 more
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

468 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Has referred 1000+ members
  • Helped several times protecting Envato Market against copyright violations
+4 more
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(); } ?>
2330 posts
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Helped several times protecting Envato Market against copyright violations
+6 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
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in 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
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in 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
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in 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

468 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Has referred 1000+ members
  • Helped several times protecting Envato Market against copyright violations
+4 more
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
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in 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?

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by