Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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(); ?>
@susanlangenes

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.