WordPress.org

Ready to get started?Download WordPress

Forums

Posts appearing on static Home page when using Feature Sliders.. (10 posts)

  1. 8persap
    Member
    Posted 3 years ago #

    Hello All.

    I really hate to post, but I've been trying to fix this problem all day now and I've haven't got anywhere.

    Here's the site I'm working on http://www.superlites.co.uk/superlites/

    I'm using a static home page. On the static home page I want to use a feature slider.

    I've created a Custom Template for the Static Home page (by copying the original page.php template, renaming it page2.php and removing the sidebar) as I want just a single column layout there, rather that the two column layout throughout the rest of the site.

    I installed the WP Slideshow plugin (http://www.iwebix.de/wp-slideshow-wordpress-plugin), adjusted the settings as directed and inserted the necessary line of php code into my Custom Page Template.

    The WP Slideshow appears on my static home page, but it also displays the 3 posts that it is rotating below the slider itself.

    I only wanted the slider to display, not the post and thought that was what this plugin would provide. I've used other rotators and sliders in the past and have never have seen the posts pulled into the static home page. So I start a bit of trial and error, removing snippets of the page2.php file, saving, and then viewing the home page to see if the posts disappeared. Nothing.

    By this point I thought it must be a problem with the WP Slideshow plugin, so I uninstall it and try another plugin.

    This time I try the WP Nivo Slider Plugin (http://www.geniusdeveloper.com.br/wordpress-en/2010/05/new-plugins-nivo-slider-for-wordpress/?lang=en). I watch the video, follow the install instructions, add slider images to the posts and add the necessary line of php to my page2.php file.

    Again, the slider displays as it should on the static home page, but underneath I have the the 3 posts that are being featured in the slider.

    You can see my problem on the site currently - http://www.superlites.co.uk/superlites/

    As the smae problem was happening with two separate plugins Im guessing the problem is with my page2.php file.

    I've spent hrs searching Google and wordpress.org to see if anyone else has encountered this problem but came up with nothing.

    I've made a number of WordPress sites now but my knowledge of php is poor at best. There maybe something glaringly obvious to a seasoned wordpress developer in my page2.php file but to a php novice like me, I'm stuck.

    Here is my page2.php custom page template :

    [Code moderated as per the Forum Rules. Please use the pastebin]

    If anyone has any idea where I am going wrong or any suggestions as to how I might be able to resolve this problem, it would be hugely appreciated. Like I said, I've been looking at this all day now and really don't know what else to do.

    Thanks for taking the time to look at this.

    Mark.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Try removing the Loop from your custom template.

  3. 8persap
    Member
    Posted 3 years ago #

    You truly are a WP master. I had removed parts of the loop but not completely. I've now removed this http://wordpress.pastebin.com/raw.php?i=ZXkXSrns , which has left me with a tiny page2.php , but it's solved the problem!

    Thanks Esmi. I see your name pop up a lot in these forums, keep up the good work.

    Mark.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    You're welcome. :-)

  5. 8persap
    Member
    Posted 3 years ago #

    Hello Again

    I wonder if I might pose another question related to this issue?

    As mentioned before, I removed the loop from my page2.php and it seemed to fix the problem. Well it did, the unwanted posts that mistriously appeared under the slider disappeared. Great.

    Problem I have now is that I when to add some more info to the Home page, but it won't appear.

    I also want to use the functionality of wonderful Eletro Widgets plugin from HackLab (http://wordpress.org/extend/plugins/eletro-widgets) to add widget content to the page area. But this is not working either.

    Here is a pastebin of the my page2.php custom template http://wordpress.pastebin.com/raw.php?i=AAXJLpD9

    Here is a link to the site http://www.superlites.co.uk/superlites/

    Any suggestions as to how I can fix this issue? As I said before, my php knowledge is poor at best. Perhaps someone who's a php whizz will look at this code and see the simple issue glaring right at them.

    Thanks for you time.

    Mark.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    If you want to add widgets to that page, you need to create 1 or more widget-capable areas. The basic method is outlined in Widgetizing_Themes which, although it refers to sidebars, can be applied to just about any template file.

  7. 8persap
    Member
    Posted 3 years ago #

    Thanks for the swift response Esmi and for the link.

    The Eletro Widgets plugin takes care of the adding widgets to the page usually. Perhaps mentioning widgets was a bit of a red herring.

    The problem I need to over come is that since I removed The Loop from page2.php, anything I put on the Home page doesn't display on the site.

    Here is a pastebin of the my page2.php custom template http://wordpress.pastebin.com/raw.php?i=AAXJLpD9 - any suggestions of what need to do to this file to make it display content that I add to the Home page in the WP Editor.

    Thanks for your time, any help greatly appreciated.

    Mark.

  8. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Sounds like Eletro Widgets either hooks onto the end of the Loop or onto the_content() within the Loop. Can you add the original Loop back into the page template but, just before the Loop (after <?php include (ABSPATH . '/wp-content/plugins/wp-slideshow/slideshow.php');?>), try adding <?php wp_reset_query();?>

  9. 8persap
    Member
    Posted 3 years ago #

    Esmi, you star! Worked a treat. Thank you for the advice once again, great appreciated.

    Keep up the good work.

    Mark.

  10. intsfanatic
    Member
    Posted 3 years ago #

    hello, i have also wp nivo slider related question, i understand that the only way to insert images into slider is by creating new posts and set featured image, but by creating new posts they will also appear on my blog page, which i dont want, so is there any way to make the posts which i use to insert images into slider not to appear on blog page ?

Topic Closed

This topic has been closed to new replies.

About this Topic