like I think page in an entry in wordpress

1

I would like to make a page in the wordpress entry

search the web trying with < - nextpage - > in the editor and adding the function in the sinple.php file but it does not work for me

They know some plugin in which you can only page entries or articles that are long, for example that have more than 6 paragraphs the content is paged or by number of characters or something like that

I appreciate your answers

    
asked by Camaliet 04.06.2017 в 20:22
source

1 answer

0

I give you options so you can do it:

1) The simplest:

Use Read More in the post:

        <?php the_content( $more_link_text , $strip_teaser ); ?> 

Here is a complete guide: link

2) A little more complicated:

This used a long time ago to split a post into two columns, ie a Flipbook.

        <div id="mybook" class="flipbook-container ">               
            <div class="page-container  page-left">
                <div  class="page-content">
                <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
                    <div class="contenido texto">
                        <?php $content = split_content();?>
                        <?php echo '<span>', array_shift($content), '</span>'; ?>
                    </div>
                </div>
                <img class="bgr-space-3" src="<?php bloginfo('template_directory'); ?>/images/bgr-space-2.png" alt="#"/>
            </div>
            <div class="page-container page-right">
                <div class="page-content">
                    <div class="contenido texto">
                        <?php echo '<span>', implode($content), '</span>'; ?>
                    </div>
                </div>
                <img class="bgr-space-3" src="<?php bloginfo('template_directory'); ?>/images/bgr-space-2.png" alt="#"/>
            </div>
            <?php endwhile; ?>  <?php endif; wp_reset_query();?>
            <div class="page-container contra-portada">
                <img class="bgr-space-3" src="<?php bloginfo('template_directory'); ?>/images/bgr-space-2.png" alt="#"/>
            </div>                  
        </div>  

You must add the following function to the WP functions.php:

  // Función para mostrar contenido en 2 columnas
  function split_content() {
      global $more;
      $more = true;
      $content = preg_split('/<span id="more-\d+"><\/span>/i',get_the_content('more'));
      for($c = 0, $csize = count($content); $c < $csize; $c++) {
         $content[$c] = apply_filters('the_content', $content[$c]);
  }
  return $content;
}
    
answered by 05.06.2017 в 05:02