URL link to post
-
This is a follow-on from the previous post but I’m opening a new thread because it is a slightly different vein.
Firstly, I’d like to state that I’m not proficient in PHP. In fact, my understanding of PHP is rather basic but I’m a quick learner.
As per my pervious posts, I’ve created a link-table and managed to display it with the following shortcode:
[if cast_and_role]<strong><u>Cast:</u></strong> <ul>[each cast_and_role] <li><a href="{@permalink,esc_url}">{@related_actors}</a> as {@related_characters}</li>[/each]</ul>[/if]
As you can see, I’ve tried to create a link for my ACTOR field. However, when I click the link on the front page, the page just refreshes which I’m assuming is because the url doesn’t really take it anywhere. I would like to direct the link to the post it is related to.
Is it possible to do this with just shortcode alone and, if so, how do I go about this?
I’ve tried several options using the shortcode examples in https://docs.pods.io/code-snippets/build-anything-with-pods-pods-template-examples/ but with no success.If I do need to add PHP to the shortcode, where would I put it?
- The topic ‘URL link to post’ is closed to new replies.