• Resolved brantz88

    (@brantz88)


    When you click on a category in the side bar you go to a list of items and if you click on that item you get a link at the top of the item that takes you to another item in another category.

    I’d like this link to go back to the category home page instead of the next article – sorry don’t know what that is called.

    TIA – Doug

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

    (@brantz88)

    Here is the website:

    http://faa.appstate.edu/wordpress

    You see when you click on a category like art you see the items – well 1 item for now and then when you click on the 1 item you can read the whole story, but at the top is the title for another story in another category and all I would like at the top is a link back to the category home page. Hope that makes sense.

    Doug

    Thread Starter brantz88

    (@brantz88)

    Do I simply need to change the code in one of the files I can manage as admin to change the link at the top of each full story to go back to category home page?

    Anyhelp or pointers in the right direction?

    Thanks,
    Doug

    Thread Starter brantz88

    (@brantz88)

    Would I find the answer I need here?
    http://codex.wordpress.org/Template_Tags/link_pages

    To remove the links at the top of the single post item page?

    In that theme you’ll need to open the single.php file in the theme folder (default) and edit (=delete or comment out) the code for the next/previous post.

    For having a link to the category, check out the Template_Tags#Category_tags

    Thread Starter brantz88

    (@brantz88)

    Thanks Moshu – I commented that section out and it works exactly how I need it to. But now to add the link back to the category’s home page.

    Can I use this?
    <?php the_category(‘separator’, ‘single’ ); ?> and place it right after the part I commented out in the single.php?

    Or should I look at the code for the sidebar and see how that link is created and add it to the single.php file?

    Thanks again,
    Doug

    The code in the sidebar would give the list of categories and I don’t think that’s what you want.

    Unfortunately you cannot spare some “home work”… At the link I gave above read about ALL the tags to see if you can find something useful.

    Thread Starter brantz88

    (@brantz88)

    Cool – I figured it out. I pasted this line:
    <p>This post is in: <?php the_category(', '); ?></p>
    under the commented out part in single.php and it works great.

    Thanks again – this is resolved.

    Doug

    Glad to hear it worked as you wanted.
    Next time if a topic of yours is resolved you can scroll up and change the “not resolved” to “resolved”. Thank you. (Now I did it for you:)

    Thread Starter brantz88

    (@brantz88)

    Thought I did that – but it said this is not the sound of one hand clapping?

    I also notice on category homepage that the articles or posts are shown in full not summary – guess that is changed under the Admin menu – not to list full story unless title is clicked on?

    Thnaks again –
    Doug

    Nope. You should open the archive.php file (not the archives.php!!!) and replace the_content tag with the_excerpt.

    Thread Starter brantz88

    (@brantz88)

    I’ll look at the archive.php file, glad I asked – thanks again!

    Doug

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Changing top link in Category Item’ is closed to new replies.