Darren

Convert text lines to list items

<?php // Get the points from the ACF field $points = get_sub_field(‘points’); // Add new line to each point $points = explode(“\n”, $points); // Now convert to HTML ?> <ul><?php foreach($points as $point) : ?> <li><?php echo $point ?></li><?php endforeach; ?> </ul>

How to Disable WordPress PHP Error Messages

Sometimes even with the WP_DEBUG setting set to false you will see PHP error messages. This is normally because of the PHP setup configuration on the server. If you are seeing warnings that are causing issues with your theme add the code below to your wp-config.php file and all errors will be hidden. ini_set(‘display_errors’, ‘Off’);ini_set(‘error_reporting’, …

How to Disable WordPress PHP Error Messages Read More »