• Resolved virtuallynicky

    (@virtuallynicky)


    In the theme I am currently building, I will be separating a category from the rest of the blog to make it seem to be a separate section of the site. I know how to link to the category page itself – but I also need to be able to link to the most recent on it’s own page.

    I’ve been going through the codex so much tonight I’m starting to go crosseyed so all help gratefully recieved!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter virtuallynicky

    (@virtuallynicky)

    Am I to take it this is not possible? ??

    Almost everything is possible, but forgive me, I don′t understand your question.
    1. You have a blog with several categories
    2. One of these categories you will style differently from the others, so that your users think, they are on another section of your website
    3. Then you will create a link in your navigation to this special category

    So far, so good.

    But where are the recent posts of this category? Will you create a seperate page for the recent posts? Or want you just put the recent posts of this category on your blog homepage? Or do I understand your question completely wrongly?

    Thread Starter virtuallynicky

    (@virtuallynicky)

    Sorry Evita, I’ll try and explain what I meant better :o)

    Your 3 points were correct.

    The category I am “separating”, fo the sake of explanation, can be called “story”.

    “Story” has it’s own category-page styling, and there is a link to the “story” category on the blog. I also need to generate link to a page which shows the most recent “episode” in the story – like wp generates pages for all individual entries. What I definately DON’T want is to put them on the blog homepage :o)

    The hard way to get this link into the template would be to update it every time the new episode got added, but I figured wp might be able to automagically generate the code somehow?

    Have I just made things even less clear?

    Thread Starter virtuallynicky

    (@virtuallynicky)

    Ooh looks good. thanks will give it a go :o)

    Thread Starter virtuallynicky

    (@virtuallynicky)

    This definately does what I want – I just need to work out how to get it to let me use an image as a link now… LOL

    Just a word of warning. Coffee2code’s plugins are great, but use older syntax in them, and chances are, won’t be working with the upcoming 2.1.

    If I understand your correctly, you want to exclude “story” from the home page, have a separate page just for those posts, with a different style.

    That can be done without a plugin. YOu will need to create a custom category template for “story”. You can manually create that link in your sidebar.

    Category_Templates

    To exclude a category from the home page, Template_Tags/query_posts#Exclude_A_Category_From_Your_Home_Page

    Thread Starter virtuallynicky

    (@virtuallynicky)

    Thanks Mik ??

    I’ve created the custom template already and have excluded the category from the main page.

    What I need is something similar to what the aforementioned plugin does, but to link to the most recent entry in story category as the actual category page is going to serve as an archive page for that category and show more “chapters” per page.

    In that case, I would use one of the “aside” type plugins/hacks to show that post.

    https://katesgasis.com/2006/05/02/sideblog-plugin-v30/

    Adding_Asides

    <h2>Latest Entry</h2>
    <ul class="nav">
    <?php
    $posts = get_posts('numberposts=1&category=1');
    foreach($posts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>
    </ul>

    Is some code that might work in the sidebar as well, where category=1 the 1 is the cat ID for the story cat.

    Hope that helps.

    Thread Starter virtuallynicky

    (@virtuallynicky)

    I’ll give that a go, thanks :o)

    Thread Starter virtuallynicky

    (@virtuallynicky)

    Ok, the Kate’s aside thing is working perfectly – but I’m still trying to work out how to get it to call an image for the link rather than text.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Linking to most recent in category..?’ is closed to new replies.