Breadcrumbs – Exclude Child Categories
Here’s a suggestion: Yoast’s SEO plugin is practically a must for a WordPress site, and has a breadcrumb implementation baked in.
Here’s a suggestion: Yoast’s SEO plugin is practically a must for a WordPress site, and has a breadcrumb implementation baked in.
wp_nav_menu( array( ‘theme_location’ => ‘primary’ ,’items_wrap’ => ‘<ul id=”%1$s”>%3$s</ul><div><p>content</p></div>’ ) ); See @toscho’s detailed explanation of the items_wrap parameter for more information.
There’s wp_login_form() for such cases. It offers tons of hooks to extend it. // In your template wp_login_form( array( /* Args: refer to Codex page */ ) ); A more in-depth look at the filters, can be found here @GitHub WP Core source. ‘login_form_top’ – above login-username ‘login_form_middle’ – above login-submit ‘login_form_bottom’ – below login-submit … Read more
Chris’s article looks for the img tag on your post. Since you are using WordPress, and I’m assuming the WordPress uploads feature, here is how you can get the first uploaded image on your post. Paste the following code in your theme’s functions.php file. //function to call first uploaded image in functions file function main_image() … Read more
The WordPress APIs rely on the global $wpdb object, you can define any arbitrary object of type wpdb but that doesn’t mean WordPress will use it. Instead, something akin to the following might be better: global $wpdb; $tempDB = $wpdb; $wpdb = new wpdb(DB_USER2, DB_PASSWORD2, DB_NAME2, DB_HOST2); // do your remote SQL stuff // perhaps … Read more
Use locate_template() if you want to use a file from your theme. include() or require() works too. Sample code, tested: add_filter( ‘login_message’, ‘wpse_73619_include_login_message’ ); function wpse_73619_include_login_message() { print ‘<pre>’; locate_template( ‘style.css’, TRUE ); print ‘</pre>’; }
- is a hyphen or minus, not a dash. Converting it to an en dash is actually the correct thing to do from a typographical standpoint. http://en.wikipedia.org/wiki/Hyphen-minus Typography is one of those deep-read kind of ideas, but the bottom line is that you think the hyphen minus is the correct character to use because of … Read more
Here you go: function get_author_post_tags_wpa78489($author_id,$taxonomy = ‘post_tag’){ //get author’s posts $posts = get_posts(array( ‘author’ => $author_id, ‘posts_per_page’ => -1, ‘fields’ => ‘ids’ ) ); $ts = array(); //loop over the post and count the tags foreach ((array)$posts as $p_id) { $tags = wp_get_post_terms( $p_id, $taxonomy); foreach ((array)$tags as $tag) { if (isset($tags[$tag->term_id])){ //if its already … Read more
In if ($thumbnail_image && isset($thumbnail_image[0])) { – should $thumbnail_image[0] not be $thumbnail_caption.
You can try to add this line to your code example for the admin_menu filter: remove_meta_box(‘awd_fcbk_awd_mini_form_metabox’, ‘post’, ‘side’); where awd_fcbk is the plugin slug. Edit: This is the metabox that I’m targeting from the plugin source code: //Like button manager on post page type add_meta_box($this->plugin_slug . “_awd_mini_form_metabox”, __(‘Facebook AWD Manager’, $this->ptd) . ‘ <img style=”vertical-align:middle;” … Read more