Forums

assign tags to portion of post, not whole post (7 posts)

  1. rcragun
    Member
    Posted 1 year ago #

    Is it possible to assign tags to a portion of a post and not the whole post? So, let's say I have the following text:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet, tortor sed rhoncus vulputate, lorem ligula egestas neque, nec dapibus felis lorem a lacus. Nam blandit volutpat sodales. Aenean eget mi augue, at pretium dolor.

    Now let's say I want to assign the first sentence to the tag "dolor" and the second sentence to the tag "tortor" and the third sentence to the tag "blandit". Is there a way to do that or are tags only applicable to entire posts?

    Additionally, if there is a way to assign tags to portions of a post, would it be possible to retrieve just those snippets when you search for a specific tag?

    If tags are applicable only to an entire post, how would I change that, assuming I want to? And how could you do a search for just tagged portions of posts?

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    tags apply to the whole post. The relate to the post ID in the database. You can't use the in-built tag system as is for your purposes....

    i'm sure something could be coded up for your purposes, but thats outta my league

  3. rcragun
    Member
    Posted 1 year ago #

    Rev. Voodoo;

    That's what I was thinking.

    So, could this be done with a plugin, or would the actual wordpress codebase have to be modified? If it could be done as a plugin, I can give it a try, but I'm wary of trying to modify the wordpress code.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    I'm sure it could be done with a plugin...but I'd have no idea how.....

    Maybe by use of a counter in php, counts paragraphs and allows you to assign tags to each....

    Just about anything can be done via plugin.... You should never need to modify core.

  5. keesiemeijer
    moderator
    Posted 1 year ago #

    Or maybe with the use of shortcodes. examples

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Oh jeez yeah! That's a good idea. I've never messed with the shortcodes, so I always forget about them!

  7. rcragun
    Member
    Posted 1 year ago #

    I didn't even know about shortcodes. I'll have to think about that one. I'm imagining it would be possible to create a plugin that would allow you to drag snippets of your post to an ajax widget with different tags - dragging the snippet to a tag could assign it to a different shortcode. You could then simply click on the tag of interest in the widget and all of the snippets tagged with that tag would be retrieved. Okay. I can imagine it, but can I create it... :|

    Thanks for the input.

Topic Closed

This topic has been closed to new replies.

About this Topic