Custom page template- can't get content to show up properly
-
Hello. Going mad here.. ??
The page I’m struggling with…
https://51stokescroft.com.gridhosted.co.uk/bar/I’m using smooth slider and want to add it to the content bit of the page but nothing apart from the title of the slider shows up..
I created a page template:
get_header(); ?> <div id="middlecontent" role="main" class="entry-content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><?php the_title() ;?></h1> <?php the_content(); ?> <?php endwhile; else: ?> <p>Sorry, this page does not exist</p> <?php endif; ?> </div><!-- #middlecontent --> <?php get_sidebar(); ?> <?php get_footer(); ?>
And CSS for the page:
#middlecontent { margin: 0 25% 0 25%; width: 50%; } #secondary { float: right; margin-right: 5%; width: 20%; } #left-sidebar{ position:relative; float: left; width: 20%; margin-left: 5%; } /* Extra sidebar fix for narrow browsers/media devices */ @media (max-width: 800px) { #main #left-sidebar{ float: none; margin: 0 7.6%; width: auto; }
IF I mess around with the page template, and add the
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
bit under the<?php get_footer(); ?>
bit, then it shows the slider underneath the footer, but can’t get it to show up properly in the main content area…I’ll appreciate the help massively, as I’ve read so much about it, tried various functions in creating the custom page template, but can’t seem to come up with the way to do it.
Thank you a lot in advance,
Dom
- The topic ‘Custom page template- can't get content to show up properly’ is closed to new replies.