Notification icon indicating copy to clipboard operation
Notification copied to clipboard

PostTermPermalink merge tag

Open jnorell opened this issue 6 years ago • 5 comments

In a new post notification (for custom post type) I'd like to include a link to a taxonomy term archive page, and am not finding any way to create such a link currently. Eg. if post type 'books' has a taxonomy 'genre', I'd like a merge tag to fill in {books_genre_link} (or maybe {books_genre_term_link}) with a link to the corresponding term archive (return only the first term link if more than one term is allowed/set).

jnorell avatar Nov 15 '19 00:11 jnorell

return only the first term link if more than one term is allowed/set

This is the main issue here. We cannot limit the merge tag output to only the first item. A list of links, on the other hand, won't be usable.

We are missing some kind of a multi-value merge tag support, loops, etc.

jakubmikita avatar Jan 13 '20 13:01 jakubmikita

We are missing some kind of a multi-value merge tag support, loops, etc.

Maybe something similar to angular formatters?

mircobabini avatar Feb 22 '21 14:02 mircobabini

@mircobabini you mean the pipes?

jakubmikita avatar Feb 22 '21 14:02 jakubmikita

Yeah, the pipes. Maybe providing some standard pipes and making everyone able to map custom pipes, we are done.

mircobabini avatar Feb 22 '21 15:02 mircobabini

This is exactly what I figured lately! It's even implemented in the Custom Fields add-on.

I planned to move this to the base plugin and make the Custom Fields add-on extend the function.

jakubmikita avatar Feb 22 '21 19:02 jakubmikita