Here’s how it works: [acf field=”{$field_name}”] or: [acf field=”{$field_name}” post_id=”{$post_id}”] or to get a value from an ‘options’ page use this: [acf field=”no_donations_notice” post_id=”option”]
Deleting WordPress Comments in Bulk
Run the below query if you wish to bulk delete all the pending comments in wordpress. To run the query select SQL, paste the query and click GO. DELETE from wp_comments WHERE comment_approved = ‘0’ Run the following query if you wish to bulk delete all approved comments in wordpress DELETE from wp_comments WHERE comment_approved Full Article…
Programmatically create child pages on theme activation
Found on WP Stackexchange How to programmatically create child pages on theme activation.
Bulk delete WordPress posts
Taken from WP Stackexchange Don’t try to Bulk delete WordPress posts with SQL. There is post information is multiple tables. You will end up with orphan data scattered throughout the database. While it is possible to write the JOINs you’d need to delete everything, the SQL could be complex. Create a simple Loop and use the Full Article…
How To Remove Error Notices Using WordPress’ WP_DEBUG
As seen here: http://wycks.wordpress.com/2013/12/05/how-to-remove-error-notices-using-wordpresss-wp_debug/ In your `wp-content` folder create a new folder called `mu-plugins` and in that folder create a php file with the error level you want, for example: If you are using PHP 5.5 +, you will get deprecated noticed for WordPress’s mysql_* functions, you can turn them off using: Or for something really Full Article…
Enqueue/Include neutral urls for http and/or https in WordPress
Taken from here: http://wordpress.stackexchange.com/a/81897/13712 URLs must have a https or http protocol for WordPress to enqueue them. FIf possible you should use get_template_directory_uri() (for parent themes) or get_stylesheet_directory_uri() (for child themes) as both of these handle SSL if necedssary. Here’s an example: If you can’t enqueue your own local script/s and have to enqueue from an Full Article…
How to change your WordPress.org password
This appeared to not be possible for a while, hence creating this note on where it is hidden away once you are logged into WordPress.org. After some more looking, and a bit of searching, I found that the View your profile link can be found specifically on the WordPress.org Forums. Notice that the View your profile is at the top right Full Article…
WooCommerce Breadcrumbs – Add categories
Customers generally prefer product breadcrumbs that show the steps it took to get to the product they are viewing, so they can backtrack easily. Breadcrumbs, if you aren’t sure, are the row of links above the main content, below the header, that look like: Home > Catalog > Clothes > Men’s > Shirts > Blue Full Article…
How to fix ‘Notice: wpdb::escape is deprecated since version 3.6!’
The Cause: The error occurs because a function used to “escape” strings before being stored in the database has been deprecated. Escaping is the process of removing characters that can lead to SQL injection and XSS. The existing escape() function was deprecated in WordPress v3.6 RC2 and missed the previous released, and so may have Full Article…
WordPress Most Related Posts in 4 Steps
Original found here: http://codeitdown.com/wordpress-related-posts/ WordPress Most Related Posts in 4 Steps To implement a WordPress Related Posts section that displays the posts with the highest number of common tags follow the next steps: Choose or declare a thumbnail size. You’ll probably want to show thumbnails like the ones above. Those are the posts’ featured images. You’ll Full Article…