add_meta_box not working
My metaboxes suddenly stopped working. If that’s the case for you, and you are clueless, try resetting $id for your meta_box
as of 4.0, WP doesnt use define(‘WPLANG’, ‘en_GB’); in wp-config but uses $locale=’fr_FR’;
<?php function notify_post_status( $post_id = NULL, $user = ” ) { if ( ! isset($_POST[“post_id”]) ) { $post_id = $_POST[“post_id”]; } else { return $post_id; } $post = get_post($post_id); $status = $post->post_status; $type = $post->post_type; $author_id = intval($post->post_author); $user = get_userdata( $author_id ); //ignore admin if( $author_id == 1 ) return; // Which statuses should…
If you are using “page-template”s you’ll have problems with pagination since pages are not meant to display posts and some people frown upon using page-templates for custom archive display, but it’s sometimes the simplest way. Anyway the solution is 1.) to nullify the global $wpquery 2.) adding ‘paged’ => $paged arg. before displaying your posts…
Disable comments, pings trackbacks etc.. Set media sizes – optionally disable monthly based archiving. Set-up a functionality plugin for the site (add GA code, manage image_sizes, remove query string from sources etc.) . Permalink structure. Move wp-config. Modify wp-config define( ‘WP_POST_REVISIONS’, 3 ); Install favorite plugins Google Maps Easy Yoast SEO Contact Form 7 Create…
I needed a placeholder for tags input but it’s boring to display the same tags every time. But unlike posts, WP doesnt have “rand” orderby paramater. So what you can do; is to get a #no of tags and shuffle them. So basically what we do is: Check if we have a recent transient If…
My navigation menu started disappearing on category pages. First I suspected there was something with the header or menu location, I have double, triple checked everything and I was pulling my hair out trying to find a solution. Turns out, my attempt to order posts by a custom field interfered with the menu. if( ! $query->is_main_query())…