Support » Plugin: Pods - Custom Content Types and Fields » Battling linking to individual items

  • Resolved go-systems

    (@go-systems)


    I have the following, and it shows correctly, ie , each in a list

    [each casino_softwares.software_name]
    			<a href="######">{@casino_software.software_name}</a>
    			[each]

    Im battling to find out how to link to each individual softwares page. Could someone please help.

    • This topic was modified 2 years, 9 months ago by go-systems.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jim True

    (@jimtrue)

    You’ve got a couple of problems.

    When you’re using the [each relationship_field][/each] template tag loop, you don’t repeat the field inside the [each][/each] block, because that steps outside the loop. You also can’t use casino_softwares.software_name. I’m guessing that casino_softwares is your actual relationship field, so you’d want to do:

    
    [each casino_softwares]
      <a href="{@permalink,esc_url}">{@software_name}</a>
    [/each]
    

    https://docs.pods.io/displaying-pods/template-tags/each-loop-tag/

    Plugin Author Jim True

    (@jimtrue)

    I’m also not sure why you’re not using post_title instead of a field called software_name. Typically, when you create a Custom Post Type, use the fields that are provided automatically by WordPress (Post Title, Post Content (the editor), Featured Image, Excerpt). Saves you from doing double work and less things you have to include in your Pods Templates.

    Thread Starter go-systems

    (@go-systems)

    Hi Jim, thanks. Its working now.

    Plugin Author Jim True

    (@jimtrue)

    Awesome, glad to hear it 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Battling linking to individual items’ is closed to new replies.