SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    Windsor, Berkshire
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress - Thematic - Pointing a menu option to the blog!

    Hi all,
    So I've created a wordpress CMS site which uses all static pages on it using thematic. Lo and behold the client now wants the blog on there to make the most of the capabilites. The only problem is, I can't work out how to get the blog page to show up in the menu! The page is definitely there as I can set up a static page to point to the archive and then navigate back, but is it possible to set up a menu item as the main blog page?

    Bit stuck! Sure it's simple!

  2. #2
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thematic uses hooks to generate the menu. It's thematic_after_header() or something like that.

    You then need to unhook that header with remove_action() and then use add_action() to hook in the new menu layout.

    Using theme frameworks like Thematic is not particularly easy. They require a lot more knowledge to use than regular themes as you can't (or at least shouldn't) edit the core theme files and get stuck messing around with hooks like this.

    EDIT: This was my 2000th post!

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    Windsor, Berkshire
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But sureley that has no bearing on whether you want a blog page to be added to the menu? I can't see it myself? Isn't it just a case of finding a link to point the blog page to?

  4. #4
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must be misunderstanding your question.

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    Windsor, Berkshire
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I understand it may not be making much sense! basically, I have my thematic theme on pages http://www.smart-consulting.co.uk, but I want to add a link on the top menu to the blog page, which is all of the posts!

    If I add pages, they add on to the menu, but if I add posts, they do not! So is there a way of adding a blog link onto the menu?!

  6. #6
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you goto settings > reading there is an option to set the front page as a static page and display the blog posts on another page.

    So first create a page called "blog" and then a page called "home", then go back to settings > reading and select static page for front page and then pick the "blog" page you just created for the blog posts. This should make the "blog" page appear in the list of pages in the nav.

    Or, can you just hard code it in there?

  7. #7
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    Windsor, Berkshire
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    spot on! Exactly what I was looking for! Now for my next question....

    Because the client wanted different content in every sidebar on the different pages and probably wont be using the cms for much (dont ask why they wanted wordpress...) I coded the sidebars on the main pages using the actual editor, so each page has it's own sidebar etc, and removed the dynamic thematic one. Not ideal at all I know! If I remember rightly I unregistered the sidebars (or at least hope I did) using the functions.php, is there a way of adding the sidebare for just the blog page? Is that possible?

    My knowledge of php slightly lacks but from using actionscript it would merely be an if statement, although the syntax is beyond me!

  8. #8
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Assuming the "blog" page is the redirected one from the last post try:
    Code PHP:
    <?php if ( is_home() ) { ?>
     <!--blog page content goes here-->
    <?php } ?>
    If that does not work use is_page('blog') instead of is_home().

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    Windsor, Berkshire
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers for that ben, solution was spot on! Finally gaining some understanding of the thematic framework! I actually want to use it for another project now!


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
  •