Displaying Meta Data from a Custom Post Type
-
Hi Folks,
I really hope you can help out here.
I’m creating a theme for a client and I have created a custom post type called ‘Testimonials’ and now I would like to show the testimonials on the home page but I’m having trouble outputting the data for the meta information.
I have created a function in my functions.php file called ‘show_testimonials’ and I’m calling that in my index.php file (I haven’t separated everything in to their constituant parts yet, e.g header.php, footer.php etc). This function is meant to show the posts and meta information from the ‘Testimonials’ custom post type but it doesn’t.
I can see that I am pulling the correct meta data in to my ‘$meta’ variable.
Below is the code for the ‘show_testimonials’ function.
[29 lines of code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
Below is my index.php file.
[367 lines of code moderated.]
I hope someone can point me in the right direction. Cheers in advance.
- The topic ‘Displaying Meta Data from a Custom Post Type’ is closed to new replies.