WordPress bulk category select when publishing post

The default function that renders the categories meta box is post_categories_meta_box – it doesn’t have any internal hooks we can use to inject our own HTML, so let’s create our own meta box handler and just use the function internally: function wpse_406861_post_categories_meta_box( $post, $args ) { post_categories_meta_box( $post, $args ); echo <<<HTML <label> <input type=”checkbox” … Read more

WordPress.com post editor replacement

WordPress.com supports post editing via the XML-RPC protocol. There are many editors that support this so you can write your posts on your own computer and post them to WordPress.com (or your own hosted WordPress installation). The better clients are smart enough to sync content, so if you use different editors on different computers they … Read more

Posts on a Page using functions.php

You need to query them: (for more info see inline comments) /** * Template Name: Journal */ // define( ‘TEXTDOMAIN’, ‘your_textdomain_string’ ); // To be sure, we reset the query, so nothing get’s lost wp_reset_query(); global $wp_query; $query_cat = new WP_Query( array( ‘orderby’ => ‘date comment_count’ // date = default, 2nd param = comment_count ,’order’ … Read more

Stop wordpress from creating empty/null entries

When i needed a solution to the save “problem” i create an Ajax function to validate the fields and did some minor JQuery hacks: first we add our JavaScript to capture the submit/publish event and use it to submit our own ajax function before the actual submit add_action(‘wp_print_scripts’,’my_publish_admin_hook’); function my_publish_admin_hook(){ if (is_admin()){ ?> <script language=”javascript” … Read more

displaying flv-video attachment in post

The .flv is not a video player in itself, rather just a video file to be played in one. To display it, you’ll need to play it from an actual video player. Unlike .wmv and .mp4, .flv files won’t play natively in your browser without one. There’s a couple great open source options out there. … Read more