Functions.php: Exclude Category from “Blog”

http://codex.wordpress.org/Function_Reference/is_main_query add_action( ‘pre_get_posts’, ‘foo_modify_query_exclude_category’ ); function foo_modify_query_exclude_category( $query ) { if ( $query->is_main_query() && ! $query->get( ‘cat’ ) ) $query->set( ‘cat’, ‘-5′ ); } So it’s quite obvious to how exclude certain categories from within a template, … Actually it’s not. Are you talking about query_posts() !?

Why won’t pagination work?

probably coz you override the default query and forgot to take care of pagination 🙂 change the code this way: $page = isset(get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $args = array( ‘numberposts’ => $numposts, ‘paged’ => $paged ); This should do the work

How to make blog posts appear under different menu items?

By default, “Category Archives” (which is what you’re describing) are at the URL example.com/category/{category}. I would recommend that you do the following: Delete your blog and portfolio pages. Don’t just trash them, but delete them permanently from your trash (this will free up the permalinks you mention in your post). Create the two categories, Blog … Read more

problem with wordpress author profile page URL

How are you creating the author’s link? If you put in your template: <?php the_author_posts_link(); ?> It will write the author’s name and link for the current post. To modify the template for the author page, wordpress search for the following files in your theme’s folder (in this order): author-{nicename}.php author-{id}.php author.php archive.php index.php

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