WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP ImageTagger] How to link image results to tag page (20 posts)

  1. houseofstrauss
    Member
    Posted 4 years ago #

    I have associated a number of tags with images (using rich-text-tags plugin) Those images appear in image tagger and I then link them to the tags again.

    So far so good!
    In the search page (front end) the images appear after a search but they do NOT link to the tag archive page, like images in a post link back to the post page. In fact they link back only to the image tagger search page

    Have I set up something wrong, or is there a way to make tag archive images link to the tag archive page?

    Thanks for any help

    http://wordpress.org/extend/plugins/wp-imagetagger/

  2. phd38
    Member
    Posted 4 years ago #

    Could you please provide me the URL of your page in question ? I am not sure to understand your point.

  3. houseofstrauss
    Member
    Posted 4 years ago #

    Hi phd38 thanks for your reply. The site is not live yet and I'm trying this plugin out locally.

    Ok, if I link a post image to a tag in image tag explorer, then go to the front end search page, I can search for the tag and the image is returned. When I click that image, it goes to the post that has the image. This is exactly how I expect it to work.

    In my wordpress tags descriptions section. I have added images which show in the tags archives page. (nothing to do with imagetagger) However, In image tagger I can find these images in the explorer and associate them with a tag.

    So when I search for this tag in the front end again, I see that image. Now when I click it I expect to go to the tag archive page, because that's the ID page its associated with

    This doesn't happen, it just loads the search page again. I'll set up a test site online if I have still failed to explain this easily, sorry ...

  4. phd38
    Member
    Posted 4 years ago #

    Thanks for your explanations. I see now.

    This case is not covered so far. The only pages which are linked to are posts and pages. I assume linking to an archive page would require a specific treatment.

    How do you do to add images that show in the tags archive page ?

  5. houseofstrauss
    Member
    Posted 4 years ago #

    here is a demo of the problem

    1- go to http://greenecozine.com/demos/mingle/
    2- On home page you see an image in the first post
    3- Click the tag "tag-1" and you will see an image on the tag page (added by plugin rich-text-tags)
    4- in image tagger, I associate the post image with a tag called 'co-op'
    5- In image tagger I associate the tag image with its tag 'organic'
    6- Option set to Gallery output 'Link on the gallery thumbnails points to ' post containing image'
    7- in the search page co-op returns the image and when clicked goes to the post /?p=24 (ok)
    8- In search page tag-1 should go to the tag archive for tag-1, /?tag=tag-1 it doesn't, in fact it just reloads the search page /?page_id=28
    I would want this to point to the tag page /?tag=tag-1

  6. houseofstrauss
    Member
    Posted 4 years ago #

    I use rich-text-tags plugin) Those images appear in image tagger and I then link them to the tags again.

  7. phd38
    Member
    Posted 4 years ago #

    Thanks for those very accurate information, that's all clear.

    What matters now to fix this is to understand how is stored the "it's organic" image in the wp_post table.

    Could you please dump your example site database and send it to me (send me a PM at http://www.photos-dauphine.com/ecrire, I will provide my email).

  8. houseofstrauss
    Member
    Posted 4 years ago #

    Thanks, I emailed you with details.

  9. phd38
    Member
    Posted 4 years ago #

    OK, I understand the case now. We are in a very specific usage of the WP database. I will see what I can do, it is not obvious given the number of indirections involved in the insertion of the image on the tag page.

  10. houseofstrauss
    Member
    Posted 4 years ago #

    Thanks, I'll look forward to seeing what can be done here :)

  11. phd38
    Member
    Posted 4 years ago #

    I understand that this feature to associate an image to the tag page (like the "it's organic" image on http://greenecozine.com/demos/mingle/?tag=tag-1) is not standard in WordPress and provided by the rich-text-tags plugin.

    Could you please confirm ?

  12. phd38
    Member
    Posted 4 years ago #

    I prepared a development version to decide of the best way to cover this case : http://downloads.wordpress.org/plugin/wp-imagetagger.zip

    This version will display many tracing messages.

    Could you please deploy on your "Mingle" example and let me know when done ?

    The plugin should be identified (admin panel) as 2.5.3.3-dev.

  13. houseofstrauss
    Member
    Posted 4 years ago #

    Thanks for the dev version, I Have now installed this version on the test site.
    Descriptions can be shown in tags archive pages and category archives as per codex here rich-text-tags plugin only adds a wysiwyg and removes term_description and pre_term_description to allow full html to be used in the tags descriptions field. I simply add an image from the media library
    We have to add this code (in functions.php) to run html in descriptions. rich-text-tags plugin may already do this. That's it, nothing clever happening!

    remove_filter( 'term_description', 'wp_kses_data' );
    remove_filter( 'pre_term_description', 'wp_filter_kses' );

    This is the wordpress page where the image for a tag is added
    /wp-admin/edit-tags.php?action=edit&taxonomy=post_tag&tag_ID=xxx
    usually html is stripped out by that filter. I don't think there is anything special being done by that plugin, except making it easy to add html in descriptions. I could do without that plugin and simply remove the filter, as above and add <img src="whatever.gif"> then add the template tag <?php echo tag_description(); ?> in my archive tag page to show the image

  14. phd38
    Member
    Posted 4 years ago #

    I modified the code to cover your case. You can try out http://downloads.wordpress.org/plugin/wp-imagetagger.zip

    I wait for your feedback.

  15. phd38
    Member
    Posted 4 years ago #

    From what I can see on your Mingle page, sounds good, right ?

  16. houseofstrauss
    Member
    Posted 4 years ago #

    Hello phd38. That test version works and you can see that on the test site. When the tag image "it't organic" is returned, it goes top the tag page correctly. Thank-you.

    A small point: when selecting BOTH 'tag-1' and 'co-op' I would expect a search result, because they are part of the same set. Is that expectation correct, or have I not understood correctly how this works?

  17. phd38
    Member
    Posted 4 years ago #

    Concerning the point you mention, I guess there might be some confusion between the native WP post tagging, and the plugin image tagging :

    - the "organic" image is tagged with "tag-1"
    - the "co-op" image is tagged with "co-op" (although it appears in a post tagged "tag-1")

    Therefore, referring to the image tagging logics (ignoring the post tagging), "organic" and "co-op" are not part of the same image tagging category. The behaviour you observe complies with the underlying logics.

    To extend on this topic, you might be interested to know I am working on a future functionality that will automatically associate to the post tags a logical OR on all the tags associated to the images contained in the post.

    ... not sure I am clear.

  18. houseofstrauss
    Member
    Posted 4 years ago #

    Yes, I think I understand this. So you are moving into image taxonomies... ? An exciting development, I will follow this with interest. Please note. The development plugin I installed has process notifications. Are you going to remove these and make a new release, or tell me how to turn them off in my version?

    Thanks.

  19. phd38
    Member
    Posted 4 years ago #

    you will be notified automatically, no worries.

  20. phd38
    Member
    Posted 4 years ago #

    Fix officially part of the 2.5.3.3 just release.

Topic Closed

This topic has been closed to new replies.

About this Topic