[Resuelto] insert a View link in loop to show post details
Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.
Problem:
Essentially the issue here is that the user wanted to add the link to the post in his view to a text.
Solution:
To do this you will just need to specify the shortcode like the example below.
<a href='[wpv-post-url]'>Click Me for Details</a>
This support ticket is created hace 6 años, 8 meses. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
I have two custom types, "tasks" and "comments". Comments is the son of tasks.
I have the following case:
I have a view where I show all the tasks in a loop and for each item I want to have a link that directs me to another view to show the details of that task, that is, the task fields. I do not know in this case how to relate a view to another view or what is the most effective way to do it. I have tried with layouts but something I am doing wrong. Could you help me with this?
Another option that had occurred to me was to have a link to another view where I directly show the post child (comments) and bring some fields of the post parent, as a header.
Hi Shane.
I added the link to comment on the final goal I want to reach.
What I want to solve now specifically, is that in the view where I show all the tasks in a loop, I can have a link that directs me to another view to show the details of that task, that is, the fields of the task. I do not know in this case how to relate a view to another view or what is the most effective way to do it. I've tried with designs but something I'm doing wrong.
Seeing the capture with the loop of all the tasks, for example, I want the last icon to have a link to another view where I can see the details of task 1.
The previous capture has the tasks loop, and the icon marked in red (for illustrative purposes) should take me to another view where it shows the details of that task (task 1). That's what I'm trying to do now.
I hope I have been a little clearer. Sorry for my English.
The task details are all task fields (title, state, delivery date, etc.).
I want to achieve that, and after in this view I will show all child post of task, that is, "comments".
I tried it and when you enter it shows the blank page with a link "Edit this", which directs you to edit the post from the back-end.
What may be happening? I have verified the permissions and it seems that everything is fine.
Remember I want after to show all child posts (comments) also on that same page.
I proposed to create a new view, because on that page, in addition to showing all child post (comments), I would also like to add a link to a form to be able to add a new comment.
I just checked what you say and you're right, it does not work because of a problem with the template.
Irrespective of correcting the template, what I want to do can not be achieved in this way with "wpv-post-url", because afterwards I can not insert a view to show all childs posts of task "comments". Correct?
Have you seen the second option I've tried, through a view in a layout?
What is needed now is to create the template so that the items display.
Once you create the template then you can create a view for the comments and add a parent filter to it, select the option "Parent is the page where view is displayed"
Then just add this view to the template for the tareas CPT.
I understand what you tell me. What I do not understand how to do, is how to link a task of the loop with the new view where I will show the fields of tasks and the child post "comments". When I click on the link in the loop, I want it to take me to another page where I can see the new view.
The rest you tell me, I already know how to do it.