Solved

Customizing Static Home Page

Posted on 2011-02-21
9
512 Views
Last Modified: 2012-05-11
I have a wordpress web site that I have customized. I'm trying to set up the home page to be a static page, with the exception of that I want the slider that is on the home page.

I created my own page template, however, it's not displaying the proper content, it's displaying content from another page.

I know how to control the settings for a static page, but how do I customize that specific static page to incorporate a nivoslider?

Thanks in advance
<?php /* Template Name: Home Page */ ?> 

<?php

/**
 * @package WordPress
 * @subpackage Magzimus
 */
get_header(); ?>

<?php if(ts_getoption('ts_show_slider') == 1): ?>
    <div id="slider-container">
    	<div id="slider-window">
			<div id="slider">
	    		<?php get_slider_posts(5); ?>
    		</div>
    		<div class="clearer"></div>
    	</div>
    	<div class="nivo-controlNav">
    	<?php get_slider_thumbnails(5); ?>
    	</div>  		



    </div>



    <div class="clearer"></div>



	<div id="main" class="containerblock">



		<div id="content">



			<h2 class="post_title"><?php the_title(); ?></h2>



		    				<div class="clearer"></div>



			    			<div class="entry">



				    			<?php 



				    				the_content();



				    				wp_link_pages();



				    				edit_post_link();



				    			?>



			    			</div>



		    				<div class="clearer"></div>



		    			</div>



	         		



			<?php else : ?>



				<div class="post">    				



		    		<div class="entry">



						<h2 class="title"><?php echo ts_getoption('ts_not_found_title'); ?></h2>



						<p><?php echo ts_getoption('ts_not_found_text'); ?></p>

					</div>

				</div>

		        <?php endif; ?>

		</div>		

		<?php get_sidebar(); ?>

		<div class="clearer"></div>

	</div>



	<?php get_footer(); ?>

Open in new window

0
Comment
Question by:BluesMama
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 34947868
So, you already went to Settings>Reading: and chose front page displays- static, and chose your page from the drop down list?
0
 

Author Comment

by:BluesMama
ID: 34951675
I created this page template you see above. Went in to pages, and created a page based off of this template and saved it. I went in to readings and selected that page, however, that page does not show up. It shows up for a 10 day camp when it should be some home text stating prices the same as last year. When I go in to administer my pages, the page that I created is there with the original content. So I'm not understanding what is going on.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 34951708
I believe you need to go back to settings and change it to Front Page Displays: Static Page, not Latest Posts. If that doesn't do it, you might want to replace your custom page.

Did you copy the single.php, page.php, or index.php for the custom page?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:BluesMama
ID: 34951981
I have it set to the static page that I created off of the template I created.
I copied the index.php because I wanted the slider.
0
 
LVL 23

Accepted Solution

by:
jeremyjared74 earned 500 total points
ID: 34953369
The reason it is showing posts is because your index.php is for the posts page. If you will copy your page.php instead of the index.php then paste it inside the code shown here it may work. I am not sure how the slider is set up, but it should unless there is a specific tie to the posts through a hook.

Here is what needs replaced:
 
<div id="main" class="containerblock">



                <div id="content">



                        <h2 class="post_title"><?php the_title(); ?></h2>



                                                <div class="clearer"></div>



                                                <div class="entry">



                                                        <?php 



                                                                the_content();



                                                                wp_link_pages();



                                                                edit_post_link();



                                                        ?>



                                                </div>



                                                <div class="clearer"></div>



                                        </div>



                                



                        <?php else : ?>



                                <div class="post">                              



                                <div class="entry">



                                                <h2 class="title"><?php echo ts_getoption('ts_not_found_title'); ?></h2>



                                                <p><?php echo ts_getoption('ts_not_found_text'); ?></p>

                                        </div>

                                </div>

                        <?php endif; ?>

                </div>          

                <?php get_sidebar(); ?>

                <div class="clearer"></div>

        </div>



        <?php get_footer(); ?>

Open in new window


Replace that with the page.php content from the <div id="main" class="containerblock"> to the <?php get_footer(); ?> with the code from the single.php (no need to copy the <?php get_header since it is already at the top of the custom page.
0
 

Author Comment

by:BluesMama
ID: 34955524
I will try this. Thank you.
0
 

Author Comment

by:BluesMama
ID: 34966630
This worked along with completing my code with
<?php endif; ?> it works now.
Thanks!
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 34966775
You're welcome, and good job catching the <?php endif; ?> .
0
 

Author Comment

by:BluesMama
ID: 34966786
I truly appreciate the help. Sometimes you can see forest the trees.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with mod_substitute 18 35
Wordpress themes CSS? 6 30
Two decimal 5 25
Magento and WordPress installation - do they share a database? 3 27
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question