Custom Taxonomy Breadcrumb Navigation

Using your method, I’ve edited it a bit to make it more viable. Here’s the code, below I’ll explain. <ul> <li><a href=”https://wordpress.stackexchange.com/questions/149424/<?php echo home_url(); ?>/projects”>Projects</a></li> <?php $term = get_term_by(“slug”, get_query_var(“term”), get_query_var(“taxonomy”) ); $tmpTerm = $term; $tmpCrumbs = array(); while ($tmpTerm->parent > 0){ $tmpTerm = get_term($tmpTerm->parent, get_query_var(“taxonomy”)); $crumb = ‘<li><a href=”‘ . get_term_link($tmpTerm, get_query_var(‘taxonomy’)) . ‘”>’ … Read more

Is it possible to put next and previous category links?

Not sure if this is what you want, gets all the categories and outputs a link to the next and previous in the order returned from get_categories(): $this_category = get_queried_object(); $categories = get_categories(); foreach( $categories as $position => $cat ) : if( $this_category->term_id == $cat->term_id ) : $next_cat = $position + 1; $prev_cat = $position … Read more

custom menu not found

I’m not sure if I’ve followed you correctly; but I think you’re trying to build the Menu HTML entirely on your own. If I’m correct, then what you’re trying to do is covered under “Walker” object of wp-nav-menu. You need to write a separate function in your functions.php and then pass the function name as … Read more

How to make a plugin auto-add item to nav menu

this is the general gist of what you need to do, you’ll want to add some checks in here, make sure you get a valid menu returned, etc.. $locations = get_theme_mod( ‘nav_menu_locations’ ); $menu = wp_get_nav_menu_object( reset( $locations ) ); // get first item in menu locations array $menu_item_data = array( ‘menu-item-object-id’ => $your_page->ID, // … Read more

Custom Nav Walker sub-menu HTML construct

Solution: Copy paste the below code into your function. and then in template use my_nav_menu($menu_location); //put this in your functions class MY_Menu_Walker_Ext extends Walker { var $tree_type = array(‘post_type’, ‘taxonomy’, ‘custom’); var $db_fields = array(‘parent’ => ‘menu_item_parent’, ‘id’ => ‘db_id’); function start_el(&$output, $object, $depth = 0, $args = array(), $current_object_id = 0) { $output .=”<li><h2 … Read more

Dropdown list of a custom post type

You’ll need to use get_posts and roll your own drop down. Something like this (somewhere in functions.php): <?php function wpse34320_type_dropdown( $post_type ) { $posts = get_posts( array( ‘post_type’ => $post_type, ‘numberposts’ => -1 ) ); if( ! $posts ) return; $out=”<select id=”wpse34320_select”><option>Select a Doctor</option>”; foreach( $posts as $p ) { $out .= ‘<option value=”‘ . … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)