Viewing 16 replies (of 16 total)
  • Thread Starter koganas

    (@koganas)

    Hi Baden, i’ve finally got the solution. The problem was in the content and <more> tag separation. Before it was:

    /* before more tag */
    <?php if(strpos(get_the_content(),'id="more-')) : global $more; $more = 0;  the_content('<span id="mas">(...)</span>'); ?>
    
    /* after more tag */
    <?php $more = 1; the_content('', true ); else : the_content(); endif; ?>

    Instead of doing that, i’ve included this in the functions.php:

    function split_content() {
        global $more;
        $more = true;
        $content = preg_split('/<span id="more-\d+"><\/span>/i', get_the_content('more'));
    	$ID = get_the_ID();
    	$quotesq = get_field('citac');
    
        $ret = '<div id="column1">'. array_shift($content). '</div>';
        if (!empty($content)) $ret .= '<div id="target-mais'. $ID .'" class="collapseomatic_content"><div class="citath ceq">'. $quotesq .'</div>'. implode($content) .'</div>';
    	return apply_filters('the_content', $ret);
    }

    In the query, change it to:
    <? echo split_content(); ?>

    Everything is working 100% back. Thank you for your help.

Viewing 16 replies (of 16 total)

The topic ‘Plugin stopped working after updates’ is closed to new replies.