Link to subpages on the same page

get_children is the most straightforward way to get “attachments, revisions, or sub-Pages”. So… $children = get_children(array(‘post_parent’=>$post->ID)); if (!empty($children)) { foreach ($children as $child) { echo ‘<div id=”child-‘.$child->ID.'” >’; // content formatted however you want echo ‘</div>’; } See the Codex page for further parameters that you might need. I don’t know how you’ve constructed your … Read more

Wp Dropdown Category Not Show Current As Title

You can use get_query_var( ) to fetch the current category: $cat = get_query_var( ‘cat’ ); You can use this $cat in the exclude parameter of wp_dropdown_categories( ) to hide the current category: $args = array( ‘show_option_none’ => __( ‘Select A Category’ ), ‘show_count’ => 1, ‘exclude’ => $cat ); wp_dropdown_categories( $args );

Custom menu – different submenu for first menu item

Well, the answer depends on what you mean by “custom dropdown only for the first menu item which is different from the other item dropdowns” – different how? If it’s just stylistic, that extra class should be enough. You just have to make sure the css for it is specific enough to override the defaults. … Read more

Add a “default sorting” menu to child store pages

Take a look at whether or not your theme has an archive-product.php file in the woocommerce folder. This is a copy of the WooCommerce category template (which is displayed by archive-product.php. As long as your template has the do_action( ‘woocommerce_before_shop_loop’ ); action hook then the woocommerce_catalog_ordering() function should automatically be called with a priority of … Read more

How to selected value default in option list?

should be selected=”selected” NOT “selected=selected” EDIT: Ok I see – it’s because you are using a foreach arguement to say that it’s selected. Meaning that it prints the HTML showing that everything should be selected. Try something like this: <select name=”pais” class=”pais-select”> <option value=”” disabled selected>País</option> <option value=”Argentina”>Argentina</option> <?php $pais = diretorio_request(‘pais’); foreach(diretorio_countries() as $country) … Read more

Show only first child in dropdown

get_term_children() is by purpose recursive, it will always get all children and is not configurable. get_terms() is more generic function for terms retrieval. Using parent argument for it will only retrieve one level of children (while child_of will retrieve all). See linked documentation in Codex for details.

A dropdown with checklist

wp_terms_checklist() is an admin side function as you suspect. I don’t recommend trying to load admin side code on the front end (especially if you are not very very familiar with its inner workings) so essentially you are left with rolling your own code to create the checklist. You should be able to use the … Read more

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