• Resolved Cartwright

    (@morriganchilds)


    I am using the magic codes to set up my template. They are fantastic and I love how easy everything is to work with.

    However, is there any way to have the magic code be a link without writing the hyperlink for each individual one?

    For example, one of new taxonomies I created lists the Author(s) of the book. Rather than just getting the plain text listing the authors I want to show a link that would redirect to the page listing all of the posts with that tag.

    Is this possible?

    https://wordpress.org/plugins/pods/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Josh Pollock

    (@shelob9)

    Sorry that this post slipped through without being answered. That’s my fault and I apologize.

    Sounds like you need the each loop functionality provided by Pods Frontier. With Pods Frontier, you can loop through each of the items in the taxonomy field, and create a list. It works just like a foreach loop in PHP. See that plugin’s readme for more information.

    Thread Starter Cartwright

    (@morriganchilds)

    Josh I have been trying to get this to work but I don’t find the Frontier readme to be very clear.

    I have installed Frontier and the readme says:

    Pods Frontier allows you to use Pods Templates to create advanced markup, without using any PHP or sacrificing the ability to create complex templates. These new tools allow you to conditionally show output and create loops.

    Loops

    Pods Frontier enables easy looping via the [each] tag. This example shows how to loop through all entries in a relationship field–in this case a multi-select relationship field called chapters ina custom post type book–adding markup to each entry:

    Looking back at my original example (one of new taxonomies I created lists the Author(s) of the book. Rather than just getting the plain text listing the authors I want to show a link that would redirect to the page listing all of the posts with that tag). Does that mean I just have to use [each authors] in my template so it will show a link to a listing of all the books with Joe Hill as an author? Because that is not working.

    http://www.bigbcomics-libraries.com/books/locke-and-key/

    Plugin Contributor Josh Pollock

    (@shelob9)

    Using [each author] by itself is not enough. You need to have something between that and a closing each, IE [/each]. Inside your each loop you should be able to use {@name} and {@permalink} to build links. I’m not really sure, never done this with a taxonomy, only related post types like in the readme. You will need to do some experimenting.

    Plugin Contributor Josh Pollock

    (@shelob9)

    Since we have not heard back in several months, I am going to assume that this issue was fixed and mark this thread resolved.

    If it’s still an issue, please let us know here or at http://pods.io/forums

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Magic Codes for taxonomies providing a link’ is closed to new replies.