Default image size not working

My guess is that there are spaces at the end of the option names: update_option(‘image_default_size ‘, ‘post_size’); update_option(‘image_default_align ‘, ‘right’); it should be: update_option(‘image_default_size’, ‘post_size’); update_option(‘image_default_align’, ‘right’);

I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php

Driss, I tend to break up css and javascript that’s specific to a template into files specifically for that template – that way if it’s not needed on every page, I’m not loading it and thus that allows me to keep my main.js and style.css smaller. Here’s how I normally do it: if( is_page_template( ‘room.php’ … Read more

Grab posts by multiple categories

You should be able to use this: if (isset($meta_field[‘category’])) { // Get all post data for that category $post_data = get_posts_by_category($meta_field[‘category’], 0, $post_limit); } else { $args = array( ‘numberposts’ => $post_limit, ‘offset’=> 1, ‘category’ => ‘9,3’, ); $post_data = get_posts($args); }

Remove CPT slug from URL WordPress

Based on the answers provided in the question that I linked to, you would probably be best served to use a plugin such as Permalink Manager Lite. It looks after the redirecting of old URLs for you and also manages the issue of duplication. The code only option would be this answer but that depends … Read more

Working with a WP Starter theme

This is a bit subjective, but with a starter theme I’d go ahead and overwrite the existing styles as you see fit. You can always reference the original copy if you’re worried about breaking something. By starter theme, I mean a theme that has a bunch of boilerplate is intended to by copied and modified/added … Read more