Unable to read data from a single.php template
-
Hello,
I’m trying to read data from a custom single.php template.
I have my array of data (entries from a form attached to the post ID) I can displays the serialised data on the page and it appears correct however when I try to select the file path it gives me
ERROR Table in data source has no rows.
I think this is because the file can only pull the ID when the single.php is loaded, is there a way to make this work?
use case: I am using a forms plugin which has an inferior entry viewer, it doesnt work on the front end as desired. The form is attached to the post type via ACF field (each post has its own form connected through the ACF field which takes the form ID). The code is set to check the current post ID and pull the form ID entered in the ACF field. From there I run a function to gather all the entry data. I then serialised this and echo’d it and the data is shown.
Can you let me know if there is a way around this? The table is going to be shown on the same single.php template, its more of a dynamic table.
Thanks
- The topic ‘Unable to read data from a single.php template’ is closed to new replies.