Created
July 15, 2014 23:57
-
-
Save atwellpub/fc4f1a6064ccf016f2ea to your computer and use it in GitHub Desktop.
Example single-landing-pages.php file for integrating the landing-page custom post type with an active WordPress theme.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php $left_or_right = lp_get_value($post, 'default', 'sidebar'); ?> | |
<div id="main" class="container"> | |
<?php if($left_or_right === "left") { ?> | |
<!-- SIDEBAR START --> | |
<section id="sidebar" class="grid one-third"> | |
<?php lp_conversion_area(); /* Print out form content */ ?> | |
</section> | |
<!-- SIDEBAR END --> | |
<!-- CONTENT START --> | |
<section id="content" class="grid two-third"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<div class="entry-content"> | |
<h1><?php the_title(); ?></h1> | |
<?php the_content(); ?> | |
</div> | |
<?php endwhile; ?> | |
</section> | |
<!-- CONTENT END --> | |
<?php } else { ?> | |
<!-- CONTENT START --> | |
<section id="content" class="grid two-third"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<div class="entry-content"> | |
<h1><?php the_title(); ?></h1> | |
<?php the_content(); ?> | |
</div> | |
<?php endwhile; ?> | |
</section> | |
<!-- CONTENT END --> | |
<!-- SIDEBAR START --> | |
<section id="sidebar" class="grid one-third"> | |
<?php lp_conversion_area(); /* Print out form content */ ?> | |
</section> | |
<!-- SIDEBAR END --> | |
<?php } ?> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment