Main nav highlight, category, parent and posts highlight, sidebars,multiple blogs

I have the following queries when using the wordpress to create my website. I am new to wordpress…

  1. while I open my website deepakraj.in, the About Main nav button should highligt to blue color. I tried to change the CSS as said
    in some of the forums but it does not work But, when I click on About main nav button it highlights(blue color) because I have set the css for the
    .current-menu-item {background-color:#4f94cd;}

  2. When I click on the Recent blogs in the about page, it should re-direct to blog(main nav) page and highlight in

blue. Or even if i click on the blogs present in the blog.php, the blog main nav button should enable to blue.

  1. Same with the category and posts. While click on the category and posts the specific category should highlight.

  2. i like to create different sidebars for all the pages. how do I do it?

  3. Can i have multiple blogs? I like to have blog, photos and drawings, videos pages in blog format. is it possible.

Hi there,

  1. I see you have already figured out that making the About page the home page does the trick (the other option is to go in to Wordpress’ Settings -> Reading section, change the home page to a static page (and then select About)

  2. You could simply make the Recent Blogs heading a link to /blogs/ if you want to link it through. It would be a bit harder to keep the Blog menu item highlighted when you’re on an individual blog post, as technically you are no longer on the Blog page. Though what you can do it fake it. The body tag receives some classes when you are on a blog post, i.e. “single single-post postid-1 single-format-standard”. This will allow you to know what current “page-type” you’re on. e.g. a “single-post” page is the default for blog posts.

  3. I’m not seeing any categories listed on your site (Do you mean the “Videos” and “Photos and drawings”? If so, you could make them categories rather than pages and use the Appearance -> Menus to create a menu with the categories you want that you can then stick in the sidebar.)

  4. One of the easiest ways for different sidebars is to have separate page templates, and from there you can include them.

The basic structure of a page template with custom sidebar is:


<?php
  /*
    Template Name: Your Template Name
  */
?>

<?php get_header() ?>

<?php the_post() ?>
<!-- Do something with the_post() -->        

<?php get_sidebar("yourawesomesidebar") ?>

<?php get_footer() ?>

To make this work, you will need to have a sidebar.php in your theme (or parent theme) folder. You can use this as a base if you wish. Now you can create a new file called sidebar-yourawesomesidebar.php and any pages that use the “Your Template Name” will now also use the new sidebar.

  1. You could have multiple categories, multiple sites, custom post types, et al. Not sure about “multiple blogs” per se, but I guess that depends on how you define it :stuck_out_tongue:
    In your case, I would probably opt to have either a category or custom post type. Categories would be relatively easy to implement, you could have some “generic” categories that you post with on your “normal” blog and then specific categories called “video” and “drawing” for example.
    If you want to go for Custom Post Types, the Wordpress codes is a pretty good starting point for this. http://codex.wordpress.org/Post_Types