how to mage the submenu open on wordpress active page

When on the Corporate profile page, that menu item has the following classes: current_page_item current-menu-ancestor current_page_ancestor. Any of these are attached to a menu item when you are on that page, or a child page. Target these in your stylesheet, and set the .sub-container div to have display:block;. That should do the trick. Also, your … Read more

How to make “my posts” page

I think this is what you are looking for: function my_posts_shortcode_wpse_135655() { if (!is_user_logged_in()) return; global $current_user; get_currentuserinfo(); if (!empty($current_user->ID)) { $userp = new WP_Query( array( ‘post_author’ => $current_user->ID, ) ); $content=””; if ($userp->have_posts()) { while ($userp->have_posts()) { $userp->the_post(); $content .= get_the_title(); } } else { $content .= “You don’t have any posts.”; } wp_reset_postdata(); … Read more

Insert taxonomy term to different table

Check out the codex: http://codex.wordpress.org/Function_Reference/get_terms For example, if you don’t override the hide_empty argument, it will only retrieve terms that are attached to at least one post. As for your code, there are no email and contact properties for a $term object. And why $result = … if you’re not using it anywhere?

The page that displays Posts on homepage

The way you are thinking wordpress is, is not like that. You can’t find the query and alter it like you do in plain PHP. There are filters and actions and a whole architecture to play with pages and posts. I suggest you to read wordpress documentation and Codex. If you are a programmer then … Read more

How to display a term of taxonomy

I found the solution thanks to answer this question: Specify number of posts in my ‘tax_query’ I wanted to show the posts for ‘futbol’ within the ‘tipo_deporte’ taxonomy: <?php $args = array( ‘posts_per_page’ => 2, ‘tax_query’ => array( array( ‘taxonomy’ => ‘tipo_deporte’, ‘field’ => ‘slug’, ‘terms’ => array(‘futbol’), ) ) ); $query = new WP_Query( … Read more