SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

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

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

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

  2. #2
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    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 Code:
    <?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.

    5) 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 :P
    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
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •