How To Disable Automatic Updates in WordPress
To disable automatic updates in WordPress, simply edit the wp-config.php file in your WordPress root directory and add the following line:
1 |
define( 'WP_AUTO_UPDATE_CORE', false ); |
To disable automatic updates in WordPress, simply edit the wp-config.php file in your WordPress root directory and add the following line:
1 |
define( 'WP_AUTO_UPDATE_CORE', false ); |
If you get the following error in WordPress when using the WPDataTables plugin, follow these steps to fix it: “You are trying to load a table of an unknown type. Probably you did not activate the addon which is required to use this table type.” SOLUTION SUMMARY: You must update the plugin files manually, deactivate […]
ERROR: Briefly Unavailable for Scheduled Maintenance. Check Back in a Minute CAUSE: WordPress did not complete an action SOLUTION: Either – remove ~/wordpress/.maintenance – edit ~/wordpress/wp-activate.php and set define( ‘WP_INSTALLING’, false );
Create two template files in the wp-content/themes/{themeName}/ subdirectory:
1 2 |
page_blog.php page_blog_plus_content.php |
page_blog.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<?php /* WARNING: This file is part of the core Genesis framework. DO NOT edit this file under any circumstances. Please do all modifications in the form of a child theme. */ /** * Template Name: Blog * This file handles blog post listings within a page. * * This file is a core Genesis file and should not be edited. * * @category Genesis * @package Templates * @author StudioPress * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://www.studiopress.com/themes/genesis */ genesis(); |
page_blog_plus_content.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<?php /* WARNING: This file is part of the core Genesis framework. DO NOT edit this file under any circumstances. Please do all modifications in the form of a child theme. */ /** * Template Name: Blog Plus Content * This file handles blog post listings within a page. * * This file is a core Genesis file and should not be edited. * * @category Genesis * @package Templates * @author StudioPress * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://www.studiopress.com/themes/genesis */ // to see the page title and page content, uncomment this: add_action('genesis_loop', 'genesis_standard_loop' ,5); genesis(); |
1 2 3 4 |
global $wp; $slug_missing_outside_slashes = add_query_arg( array(), $wp->request ); $current_url = home_url( $slug_missing_outside_slashes ); $form_action = '/' . $slug_missing_outside_slashes . '/'; |
https://codex.wordpress.org/Determining_Plugin_and_Content_Directories
The first query gets all custom publication posts that have a value in field book_seq ordered by book_seq The second query gets all custom publication posts that have no meta value for book_seq or no meta record for key book_seq ordered by post_title.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
$querytop = get_posts(array( 'post_type' => 'publication', 'numberposts' => -1, 'orderby' => 'meta_value', 'meta_key' => 'book_seq', 'order' => 'ASC', 'meta_query' => array( // meta query takes an array of arrays, watch out for this! array( 'key' => 'book_seq', 'value' => array('', 'NULL'), 'compare' => 'NOT IN' ) ) )); $querybottom = get_posts(array( 'post_type' => 'publication', 'numberposts' => -1, 'orderby' => 'post_title', 'order' => 'ASC', 'meta_query' => array( // meta query takes an array of arrays, watch out for this! 'relation' => 'OR', array( 'key' => 'book_seq', 'compare' => 'NOT EXISTS' ), array( 'key' => 'book_seq', 'value' => array('', 'NULL'), 'compare' => 'IN' ) ) )); $store_query = array_merge($querytop, $querybottom); |
Great article here: https://rudrastyh.com/wordpress/meta_query.html
1 2 3 4 5 6 |
find wordpress/wp-content/plugins -type d -exec chmod 2775 {} \; find wordpress/wp-content/plugins -type f -exec chmod 664 {} \; find wordpress/wp-content/themes -type d -exec chmod 2775 {} \; find wordpress/wp-content/themes -type f -exec chmod 664 {} \; find wordpress/wp-content/upgrade -type d -exec chmod 2775 {} \; find wordpress/wp-content/upgrade -type f -exec chmod 664 {} \; |
1 2 3 4 |
add_filter( 'user_meta_admin_email_recipient', 'changeAdminEmails' ); function changeAdminEmails( $emails ) { return array( 'youremailtarget1@yourdomain.com', 'youremailtarget2@yourdomain.com' ); } |
Decided to go for it and dive into the world of the WordPress block editor based on the improvements in version 5.4 – First, the upgrade went smoothly. Second, switching to the new block editor was easy. Third, making this post seems pretty painless. I disabled full-screen mode because I simply don’t like it ;-} […]
1 2 3 4 5 6 7 8 |
add_action('admin_init', 'redirect_non_admin_users' ); function redirect_non_admin_users() { if ( ! current_user_can( ‘manage_options’ ) && (‘/wp-admin/admin-ajax.php’ != $_SERVER[‘PHP_SELF’]) ) { wp_redirect ("Your_Destination_URL_Here"); die(); exit; } } |