© Toffy Digital The sweetest digital solutions 2019

Category: WordPress

remove or customise icon found in ‘previous_post_link()’ and ‘next_post_link()’

Use the following code to remove the default backward and forward icons. Original: <?php previous_post_link() ?> <?php next_post_link(); ?> Change to: <?php previous_post_link(‘%link’); ?> <?php next_post_link(‘%link’); ?> or <?php next_post_link(‘%link’, ‘Previous’); ?>

Read More

Checking if a custom post type field exits

if(get_field(‘post_type_name’)){ //output value if poste type exists }

Read More

Display page / post / custom post type title

Display the page title using the following code.

Read More

ACF Displaying a select field

To display field valuses use this code $field = get_field_object(‘field_name’); $value = get_field(‘field_name’); $label = $field[‘choices’][ $value ];

Read More

Increasing the WordPress Memory Limit

Edit your wp-config.php file and enter: define(‘WP_MEMORY_LIMIT’, ’96M’);

Read More