Hide or Show Read More Button by Content Area
This checks the number of characters and hide the button server-side in content.php: <?php $excerpt = get_the_excerpt(); $excerpt_length = strlen($excerpt); $excerpt_limit = 100; // Match the limit set in functions.php // only for debugging: var_dump($excerpt); var_dump($excerpt_length); ?> <div class=”news-main”> <?php the_excerpt(); ?> </div> <?php if ($excerpt_length >= $excerpt_limit) : ?> <div class=”news-read”> <a href=”<?php echo … Read more