• I would like to creat a blank page template for landing pages, but cant find how to do it while keeping the style from the rest of the site.

    The template I have created is here, https://dj-hire-london.co.uk/test-3/ using the code below, any help would be appreciated.

    <?php
    /*
    Template Name: LPS
    */
    ?>
    <html>
    <head>
    <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
    <style type="text/css">
    body
      { background-color: #3a3a3a; background-image: url('https://dj-hire-london.co.uk/wp-content/uploads/2013/12/dj-hire-london-background.jpg'); background-repeat: repeat; background-position: top center; background-attachment: fixed;
    }
    
    </style>
    
    <title><?php
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    ?></title>
    <?php
    wp_head();
    ?>
    </head>
    
    <body>
    <?php while (have_posts()) : the_post(); ?>
    <div id="page-content">
    	<?php the_content(); endwhile; ?>
    </div>
    </body>
    </html>
Viewing 6 replies - 1 through 6 (of 6 total)
  • Post the full code in your default page template and then we can edit it for you.

    you will need to keep the wrapping html structure, i.e. copy some html sections of header.php and footer.php

    Thread Starter jordylass

    (@jordylass)

    Thanks this is the page.php

    <?php get_header(); ?>
    	<?php if( is_front_page() ) : ?>
    		<?php if( pinboard_get_option( 'slider' ) ) : ?>
    			<?php get_template_part( 'slider' ); ?>
    		<?php endif; ?>
    		<?php get_sidebar( 'wide' ); ?>
    		<?php get_sidebar( 'boxes' ); ?>
    	<?php endif; ?>
    	<div id="container">
    		<section id="content" <?php pinboard_content_class(); ?>>
    			<?php if( have_posts() ) : the_post(); ?>
    				<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
    					<div class="entry">
    						<header class="entry-header">
    							<<?php pinboard_title_tag( 'post' ); ?> class="entry-title"><?php the_title(); ?></<?php pinboard_title_tag( 'post' ); ?>>
    						</header><!-- .entry-header -->
    						<div class="entry-content">
    							<?php the_content(); ?>
    							<div class="clear"></div>
    						</div><!-- .entry-content -->
    						<?php wp_link_pages( array( 'before' => '<footer class="entry-utility"><p class="post-pagination">' . __( 'Pages:', 'pinboard' ), 'after' => '</p></footer><!-- .entry-utility -->' ) ); ?>
    					</div><!-- .entry -->
    					<?php comments_template(); ?>
    				</article><!-- .post -->
    			<?php else : ?>
    				<?php pinboard_404(); ?>
    			<?php endif; ?>
    		</section><!-- #content -->
    		<?php if( ( 'no-sidebars' != pinboard_get_option( 'layout' ) ) && ( 'full-width' != pinboard_get_option( 'layout' ) ) ) : ?>
    			<?php get_sidebar(); ?>
    		<?php endif; ?>
    		<div class="clear"></div>
    	</div><!-- #container -->
    <?php get_footer(); ?>

    try this

    <?php
    /*
    Template Name: LPS
    */
    ?>
    <html>
    <head>
    <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
    <style type="text/css">
    body
      { background-color: #3a3a3a; background-image: url('https://dj-hire-london.co.uk/wp-content/uploads/2013/12/dj-hire-london-background.jpg'); background-repeat: repeat; background-position: top center; background-attachment: fixed;
    }
    
    </style>
    
    <title><?php
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    ?></title>
    <?php
    wp_head();
    ?>
    </head>
    
    <body>
    <div id="wrapper">
    	<div id="container">
    		<section id="content" <?php pinboard_content_class(); ?>>
    			<?php if( have_posts() ) : the_post(); ?>
    				<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
    					<div class="entry">
    						<header class="entry-header">
    							<<?php pinboard_title_tag( 'post' ); ?> class="entry-title"><?php the_title(); ?></<?php pinboard_title_tag( 'post' ); ?>>
    						</header><!-- .entry-header -->
    						<div class="entry-content">
    							<?php the_content(); ?>
    							<div class="clear"></div>
    						</div><!-- .entry-content -->
    						<?php wp_link_pages( array( 'before' => '<footer class="entry-utility"><p class="post-pagination">' . __( 'Pages:', 'pinboard' ), 'after' => '</p></footer><!-- .entry-utility -->' ) ); ?>
    					</div><!-- .entry -->
    
    				</article><!-- .post -->
    
    		</section><!-- #content -->
    
    		<div class="clear"></div>
    	</div><!-- #container -->
    </div><!-- #wrapper -->
    </div>
    </body>
    </html>

    This should take out the title headings

    <?php
    /*
    Template Name: LPS
    */
    ?>
    <html>
    <head>
    <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
    <style type="text/css">
    body
      { background-color: #3a3a3a; background-image: url('https://dj-hire-london.co.uk/wp-content/uploads/2013/12/dj-hire-london-background.jpg'); background-repeat: repeat; background-position: top center; background-attachment: fixed;
    }
    
    </style>
    
    <title><?php
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    ?></title>
    <?php
    wp_head();
    ?>
    </head>
    
    <body>
    <div id="wrapper">
    	<div id="container">
    		<section id="content" <?php pinboard_content_class(); ?>>
    			<?php if( have_posts() ) : the_post(); ?>
    				<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
    
    						<div class="entry-content">
    							<?php the_content(); ?>
    							<div class="clear"></div>
    						</div><!-- .entry-content -->
    						<?php wp_link_pages( array( 'before' => '<footer class="entry-utility"><p class="post-pagination">' . __( 'Pages:', 'pinboard' ), 'after' => '</p></footer><!-- .entry-utility -->' ) ); ?>
    					</div><!-- .entry -->
    
    				</article><!-- .post -->
    
    		</section><!-- #content -->
    
    		<div class="clear"></div>
    	</div><!-- #container -->
    </div><!-- #wrapper -->
    </div>
    </body>
    </html>
    Thread Starter jordylass

    (@jordylass)

    Thanks, there was a missing end, but once that has gone in, I do have the page, but not my site background or widgets.

    What I would like to achieve is a full size white page for content, on which the widgets work. The theme has the content and then a wrapper, which I would like to remove

    <?php
    /*
    Template Name: LPS
    */
    ?>
    <html>
    <head>
    <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
    <style type="text/css">
    body
      { background-color: #3a3a3a; background-image: url('https://dj-hire-london.co.uk/wp-content/uploads/2013/12/dj-hire-london-background.jpg'); background-repeat: repeat; background-position: top center; background-attachment: fixed;
    }
    
    </style>
    
    <title><?php
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    ?></title>
    <?php
    wp_head();
    ?>
    </head>
    
    <body>
    <div id="wrapper">
    	<div id="container">
    		<section id="content" <?php pinboard_content_class(); ?>>
    			<?php if( have_posts() ) : the_post(); ?>
    				<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
    					<div class="entry">
    						<header class="entry-header">
    							<<?php pinboard_title_tag( 'post' ); ?> class="entry-title"><?php the_title(); ?></<?php pinboard_title_tag( 'post' ); ?>>
    						</header><!-- .entry-header -->
    						<div class="entry-content">
    							<?php the_content(); ?>
    							<div class="clear"></div>
    						</div><!-- .entry-content -->
    						<?php wp_link_pages( array( 'before' => '<footer class="entry-utility"><p class="post-pagination">' . __( 'Pages:', 'pinboard' ), 'after' => '</p></footer><!-- .entry-utility -->' ) ); ?>
    					</div><!-- .entry -->
    
    				</article><!-- .post -->
    <?php endif; ?>
    		</section><!-- #content -->
    
    		<div class="clear"></div>
    	</div><!-- #container -->
    </div><!-- #wrapper -->
    </div>
    </body>
    </html>
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Help with creating a page template without header, footer, sidebar’ is closed to new replies.