Support

Account

Home Forums Add-ons Repeater Field read more Reply To: read more

  • Thank you for your suggestions. I ´m afraid it is not very clear for me

    This is what I pasted in functions.php

    function custom_field_excerpt() {
    	global $post;
    	$text = the_sub_field('two-col');
    	if ( '' != $text ) {
    		$text = strip_shortcodes( $text );
    		$text = apply_filters('the_content', $text);
    		$text = str_replace(']]>', ']]>', $text);
    		$excerpt_length = 10; // 20 words
    		$excerpt_more = apply_filters('excerpt_more', ' ' . '...');
    		$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
    	}
    	return apply_filters('the_excerpt', $text);
    }
    function custom_field_excerpt_longer() {
    	global $post;
    	$text = the_sub_field('two-col');
    	if ( '' != $text ) {
    		$text = strip_shortcodes( $text );
    		$text = apply_filters('the_content', $text);
    		$text = str_replace(']]>', ']]>', $text);
    		$excerpt_length = 25; // 20 words
    		$excerpt_more = apply_filters('excerpt_more', ' ' . '...');
    		$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
    	}
    	return apply_filters('the_excerpt', $text);
    }

    and this is my repeater set

    	<div class="entry-content">
    		<?php the_content(); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>   
                        <!-- Spalten -->
        <?php if(get_field('set')): ?>
        <div>
          <?php while(has_sub_field('set')): ?>
          <div class="paragraph">
               <div class="two-col">
              <?php the_sub_field('two-col'); ?>
            </div>
            <div class="left-col">
              <?php the_sub_field('left-col'); ?>
            </div>
            <div class="right-col">
              <?php the_sub_field('right-col'); ?>
            </div>
          </div>
          <?php endwhile; ?>
        </div>
        <?php endif; ?>      
    	</div><!-- .entry-content -->

    I ´m not sure how to call the function here