WordPress.org

Ready to get started?Download WordPress

Forums

How to link a category to an external page (4 posts)

  1. erstories
    Member
    Posted 1 year ago #

    So I am have categories on my blog for the posts and when you click on one (like say "cancer"), you get a page that has a sentence at the top to the tune of "Posts in the Cancer category" and underneath that are the posts.
    Anyway, I was trying to highlight the word "cancer" in that title and link it to an external page.
    Is that possible to do via the dashboard or do I have to edit the HTML? If so, how do I do it?
    The website is erstories.net

    Thanks

  2. What you could do is make a custom template for that one particular category. If you wanted to do that for all of them, then I think that you'll need to think of something different.

    Anyway, if you want to link one title only. Make a duplicate of your category.php or archive.php template and call it category-id.php --- You'll need to find out what the id number of your category is.

    Then in that template you can change the title and insert the link to the external page.

  3. erstories
    Member
    Posted 1 year ago #

    OK. Thanks. How do I do that? Can I do this via the WP dashboard or do I have to go in to Cpanel and do it on the datebase?
    I'm a novice with doing anything with the Cpanel. If you can, tell me how exactly do it step by step. I only want to make a link from from category.

  4. You will need to go to access your site via FTP, navigate to your themes folder, download a copy of your theme files.
    Make a duplicate of the category.php (or archives.php -- not sure what your theme has)
    Get the category id of your cancer cancer category (in the admin, go to categories and hover over the name of the category, the number appears in the bottom of your screen -- I always forget what that's called)
    Make your changes in a your text editor.
    Upload the new file and test it out.

    Have a look at the template hierarchy diagram. It helps understand which template is used - http://codex.wordpress.org/Template_Hierarchy#Visual_Overview

    This is fairly easy for someone who codes websites all day everyday and does involve a bit of code fiddling. You could also hire someone to update your theme or maybe add a widget in the sidebar giving people an opportunity to link to cancer that way?

Topic Closed

This topic has been closed to new replies.

About this Topic