Remove the current item from a menu

You’ll probally want to use WP Conditional tags and do something like this: if(is_home()){ //show home menu } else if(is_page(‘mypage’)){ //show category menu for JUST that page } else{ //show the menu for all other pages } What you do inside each conditional statement is up to you. Here are 3 solutions: Use CSS and … Read more

how to edit wp category widget

// This alters the get get_terms() arguments and hides some categories function widget_category_excluder( $args ) { // Replace the numbers with category IDs you need hidden $args[‘exclude’] = $args[‘exclude’].’,1,2,3,’; // Keep it safe! // Or use exclude_tree to exclude children categories also // $args[‘exclude’] = $args[‘exclude’].’,1,2,3,’; // Keep it safe! // (,1,2,3, is enclosed in … Read more

How to have a category not show up in query post with page panigation?

When using cat in the query you need to specify the category id not name. Try this. <?php $gallery = get_cat_id(‘gallery’); $shirts = get_cat_id(‘shirts’); $hoodies = get_cat_id(‘hoodies’); $excluded_cats=”-“.$gallery.’,-‘.$shirts.’,-‘.$hoodies; $limit = 5; $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts( ‘cat=”.$excluded_cats.”&showposts=” . $limit . “&paged=’ . $paged ); ?>

category filter doesn’t work

this is the problem, starting at line 46: $args = array( ‘post_type’ => ‘post’ ); $post_query = new WP_Query($args); if($post_query->have_posts() ) { while($post_query->have_posts() ) { $post_query->the_post(); //stuff endwhile; endif; you’re not using the original query for the page, which contains just posts from the current category, and you’re replacing it with a new query that’s … Read more

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