How to check if a shortcode exists?
#23572 introduced shortcode_exists() into 3.6.
#23572 introduced shortcode_exists() into 3.6.
The contents of dynamic_sidebar are pulled from the widgets associated with this “Sidebar” aka “Widget Area” in wp-admin, as @s_ha_dum answered. There is no template file for the sidebar itself. Visit /wp-admin/widgets.php under Appearance -> Widgets and find the widget area titled homepage-infobox. You be able to add/remove widgets and possibly make changes to the … Read more
After adding print_r($wp_query); to my template and examining the results, I have discovered URL formats that work. I wrote, in my question, that the following format doesn’t work — in fact, it does – if you spell your custom taxonomy name correctly. example.com/?ctxname=term1+term2 Pretty URLs with the ‘+’ and ‘,’ operators (indicating AND and OR … Read more
What I see in your code is that your next post and previous post codes are appearing within the while loop which shouldn’t be within the loop and it should appear like this: <?php get_header(); ?> <div class=”full” > <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php endwhile; // end … Read more
These types of URLs are supported since WP 3.1: register_taxonomy( ‘types’, ‘post’, array( ‘hierarchical’ => true, ‘rewrite’ => array( ‘hierarchical’ => true ), … ); Remember to flush the rewrite rules after making the change. The template you would use for both parent and child terms is taxonomy-types.php: $current_term = get_queried_object(); if ( 0 == … Read more
You could use the conditional is_preview() to add a bit of extra content. For instance, you could put this at the very top of your single.php right after the header is called – or you could put it in your header.php file if you want it shown at the very top of the page: <?php … Read more
That is how taxonomies works by default in WordPress. There is not an archive page for “All posts that belongs to any term of a taxonomy”. And, conceptually, it is correct. Imagine you want to list all items of a biological taxonomy system: that is listing all organisms. If you translate to posts, it is … Read more
As always, people copy paste whatever they learned from and IIRC the first style is the coding style of wordpress core. As you said yourself, when there is a big block of generated HTML it is easier to look at (and balance tags) under the first style, but pragmatic people will use the second whenever … Read more
What you need to do is compare the values of the meta field _wp_page_template, which contains the page template selected for a single page with the available page templates. For this you need to construct an array of used templates, because you want the templates used by all the pages, similar as shown here: Return … Read more
I found this code; function ftc_flush_rewrites() { global $wp_rewrite; $wp_rewrite->flush_rules(); } function ftc_add_rewrites() { global $wp_rewrite; $ftc_new_non_wp_rules = array( ‘find/(this)’ => ‘/addit.php?here=$1’, ); $wp_rewrite->non_wp_rules = $ftc_new_non_wp_rules + $wp_rewrite->non_wp_rules; } add_action(‘generate_rewrite_rules’, ‘ftc_add_rewrites’); add_action(‘admin_init’, ‘ftc_flush_rewrites’); in this thread http://wordpress.org/support/topic/writing-wp_rewrite-gtnon_wp_rules-to-htaccess …not sure if that addresses the problem but good luck!