Custom theme/plugin update checks

There is no native mechanism for WP to check for updates from non-official resources. Some plugins/theme have such functionality of their own for themselves. If you want to implement such checks for arbitrary plugins/themes (coded without such in mind) it is not impossible, but will take loads of custom code and handling different possible sources … Read more

How to execute conditional script when on new customize.php (Theme Customize) screen

Okay, first, let’s set things up properly, with a callback hooked into an appropriate action hook: <?php function wpse55227_enqueue_scripts() { // Enqueue code goes here } add_action( ‘wp_head’, ‘wpse55227_enqueue_scripts’ ); ?> We’ll put all of our code in to this callback. The next step is to add our if ( ! is_admin() ) conditional wrapper: … Read more

Posts in multiple Categories different single.php

Instead of making it category specific you could use post formats and use different content-templates. In single.php you can write <?php get_template_part( ‘content’, get_post_format() ); ?> Then create different post formats add_theme_support( ‘post-formats’, array( ‘withpictures’, ‘withcomments’ ) ); Then create different post templates content-withpictures.php, content-withcomments.php When creating content the chosen post format will determine the … Read more

Theme Check gives: Required: This theme doesn’t seem to display tags?

You need to be using one of these functions to display a list of tags associated with the post: the_tags() get_the_tag_list() get_the_term_list() Otherwise the check will fail. If you’re building this theme for use with a project that doesn’t need tags, don’t bother adding support. If you’re intending on uploading it to WordPress.org for review, … Read more

Custom attribute for the title tag with wp_title()

Since all _wp_render_title_tag does is check for title-tag theme support and wrap in <title> tags, there is really no reason why your existing implementation “shall not pass”, since the proper implementation is already identical via: <title itemprop=”name”><?php echo wp_get_document_title(); ?></title> when _wp_render_title_tag does: echo ‘<title>’ . wp_get_document_title() . ‘</title>’ . “\n”; (since Theme Check is … Read more