Need help? Check out our Support site, then


Categories within a blog post

  1. I will be developing a blog that will have 7 categories. Each blog post can contain information that falls into one or more categories. Each blog post can be several pages long. The information in the blog post pertaining to a particular category might only be a single paragraph in the middle of several pages of text.

    As far as I can tell, categories are assigned to the blog post as a whole, not to specific location(s) within a post. Is there a way to assign a category to a particular location within a blog post? I read this entry on the forum: http://en.forums.wordpress.com/topic/anchors, which describes how to insert an anchor at a specific location within a post, along with a link at the top of the post that the reader would have to click to get to that (anchor) location. In this manner one could assign a category to the blog post as a whole, then put links at the top of the page to specific areas within the blog. I'd like to avoid having to insert a link at the top of the page that the reader would have to click--I'd prefer for them to be taken directly to the pertinent paragraph when they click on the category. Is there a way to do this in wordpress?

    Thank you.

  2. Yes, "categories are assigned to the blog post as a whole", so you cannot do what you're looking for by using the Categories widget. You'll need to create a custom list of anchor links in a text widget. See here for list coding:
    http://wpbtips.wordpress.com/2009/04/01/codes-useful-for-text-widgets/

  3. The thread you linked to, as well as the Support doc on anchor links, only includes the version of the code you'd use to jump to specific points within the same page. For the version you need, see example here:
    http://en.forums.wordpress.com/topic/is-there-a-possibility-to-have-a-sectional-hyperlinks-like-in-wikipedia?replies=3#post-470495

  4. For an example of this in action, see the links under "Lists of posts" in my left sidebar.

    Or you can use a static page instead of a text widget.

    Note that of course this kind of linking can only lead to single instances of each "category" you're thinking of - cannot fetch a group of posts the way the Categories widget does.

Topic Closed

This topic has been closed to new replies.

About this Topic