Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter curtdoolittle

    (@curtdoolittle)

    Am I correct that I:
    1 – create a new page template,
    2 – name it single-section.php
    3 – include the section.php template part

    is that right?

    Thread Starter curtdoolittle

    (@curtdoolittle)

    Why? The layout of the guide in the default style is gorgeous.

    At some point I’ll write a filter that allows you to choose whether to open the entire guide as is now, or whether to display just a single section and it’s children.

    The other option I can think of is to just use different documents to represent each section, and configure the page with multiple documents.

    cheers

    Thread Starter curtdoolittle

    (@curtdoolittle)

    Template name must be single-documentor-sections.php
    This template structure supplies the divs and the styles. You get the idea….
    -Cheers

    get_header();?>
    
    <div id="fullpage">
    <div class="wpb_wrapper">
    	<link rel="stylesheet" href="https://www.realitybychanting.com/wp-content/plugins/documentor-lite/skins/default/style.css" type="text/css" media="all">
    		<div id="documentor-1" class="documentor-default documentor-wrap" data-docid="1">
    			<div class="doc-sec-container" id="documentor_seccontainer">
    				<div class="doc-section wow documentor-animated documentor-fadeIn" style="visibility: visible; animation-name: none;">
    
    					<?php 
    
    					if (have_posts()) :
    
    						while (have_posts()) : the_post();
    
    							$post_id    = get_the_ID();
    
    							the_title( '<h1 class="doc-sec-title">', '</h1>' );
    
    							$content 	= get_the_content();
    
    							$content    = str_replace(']]>', ']]>', apply_filters('the_content', $content ));
    
    							echo $content; 
    
    						endwhile;
    
    					endif;
    
    wp_reset_query(); ?>
    
    				</div><div id="doc_section_end"></div>
    				<div class="doc-help"></div>
    
    			</div><div id="doc_sec_container_end"></div>
    
    		</div>
    		<div class="cleardiv"> </div>
    		<div id="documentor-1-end"></div>
    </div><div id="wpb_wrapper_end"></div>
    </div><div id="fullpage_end"></div>
    
    <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Create a WordPress Page Template to Display a Single Section?’ is closed to new replies.