Compact pingback list with favicons

The first you do: separate regular comments and pingbacks. In your comments.php set the type parameter for both: <ol class=”commentlist”> <?php // show regular comments wp_list_comments( array ( ‘type’ => ‘comment’, ‘style’ => ‘ul’ ) ); ?></ol> <ol class=”pinglist”> <?php // show pingbacks and trackbacks, short: “pings” wp_list_comments( array ( ‘type’ => ‘pings’, ‘style’ => … Read more

Theme development question regarding layouts

Your consistent/common areas are: Header (Including nav) Footer Sidebar So you can easily make them accordingly to: header.php – get_header(); footer.php – get_footer(); sidebar.php – get_sidebar(); And the right content area, as it is inconsistent, so it can be separated into a different page as: content.php (general template) content-double.php (template 1) content-page.php (template 2) etc. … Read more

Why is this Ajax not working?

When you load a php file directly via an ajax request (UncheckPackageThemeHelper.php) it’s loaded outside the context of WordPress, so no WordPress core functions are available. All WordPress ajax requests should be routed through admin-ajax.php. You can print the URL with the function admin_url: admin_url( ‘admin-ajax.php’ ) When admin-ajax.php is loaded, WordPress is bootstrapped, so … Read more

How to remove a file included in parent theme with locate_template() via child theme?

An alternative solution that takes inspiration from both answers by @Milo and @toscho. create your own function to load template, e.g. if ( ! function_exists(‘my_locate_template’) ) { function my_locate_template( $template=””, $load = false, $once = true ) { $filtered = apply_filters(‘allow_child_load_’ . $template, true); if ( ! is_child_theme() || $filtered ) return locate_template($template, $load, $once); … Read more

Same theme name issue with wordpress repository theme

WP checks for updates by sending data about all plugins and themes to the repository. To prevent false update messages for your own code you need to selectively scrub it out of those requests. The example for theme by Mark Jaquith: function cws_hidden_theme_12345( $r, $url ) { if ( 0 !== strpos( $url, ‘http://api.wordpress.org/themes/update-check’ ) … Read more

Custom Template for more than 1 Tag

Here’s an example that “abuses” the tag description field to store a template name for the tag. We use the tag_template filter to get the tag description if it exists and include a template file with the description as part of the name. You could extend this to whitelist specific template names so typos don’t … Read more