Last active
February 2, 2016 22:52
-
-
Save susanlangenes/739d401c65749dd67308 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Template Name: Civi Form Page | |
* | |
* 1/3, 2/3 page template | |
* | |
* @package MRG Theme | |
*/ | |
get_header(); ?> | |
<header class="entry-header"> | |
<h1 class="entry-title"><?php the_title(); ?></h1> | |
<p class="intro-text"><?php echo the_field('intro_text'); ?></p> | |
</header><!-- .entry-header --> | |
<?php if( get_field('left_third_content') ): // if we can find this field, we're using content from page-civiform.php | |
?> | |
<div id="primary" class="content-area"> | |
<div class="left-third"> | |
<?php echo the_field('left_third_content'); //this is an ACF WYSIWYG editor field | |
?> | |
</div> | |
<main id="main" class="site-main shortcoded" role="main"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php get_template_part( 'content', 'page' ); // site admins use native WP page content editor to insert shortcode | |
?> | |
<?php endwhile; // end of the loop. ?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php else: // if we can't find 'left_third_content', we must be on a Civi-generated page; don't include div.left-third as it will be empty | |
?> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php get_template_part( 'content', 'page' ); ?> | |
<?php endwhile; // end of the loop. ?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php endif; ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://civicrm.stackexchange.com/questions/8904/wp-base-page-not-working-as-expected