I have two CPT (Activities and ratings) and they are connected with a 1 : n relationship, means 1 activity can have many ratings. I want now to know the data base field of the activity title in the rating post. The background is that I am using a code to copy certain data of the rating post to a standard WordPress post. And now I also want to copy the activity title from the rating post but I do not know its field name.
As an alternative the following should also work: Copy the URL of the parent post detail page/template page (URL to the activity) into the title of the child post (rating). So when I read the rating I can click on the title of the rating and this routes me to the activity
yes exactly. The use case is the following: User reads on a page (not the activity page itself) the rating to the activity XY. Then the user should be able to click somewhere on this rating post to get forwarded to the activity XY.
If can tell me on what page you want to display what then I will be able to guide you in the right direction.
Can you please tell me that and share admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've edit the content template where you added the view and added the single field block and set this single field block to display the parent post type "activity" post title with link:
As you can see with the following screenshot: hidden link
Can you please confirm it works as expected now:
- hidden link
thanks for checking my issue and half is now solved. To solve it finally, can you please check how the link to the parent post (i.e. to the activity) can be copied from the post-type “bewertung” to the automatically created post-type “post”. In my screenshot you see on the left side the screen of the post-type “bewertung” and on the right side you see the post-types “post” which are the standard WP posts. You also can see that the posts from post-type “bewertung” are copied to post-type “post” when a new “bewertung” is created. This copy happens thanks to the php.codehanks to the first PHP code in my function.php. So to summarize: I also need to have the link to the activity in the wordpress standard posts. This standard posts you find when clicking on the menu item “WordPress Posts”
As per our support policy, we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery for the original issue reported with this ticket.
May I ask you to open a new ticket with every new question you may have and you can also link the old ticket link with new ticket if its dependent issue when required.