How to C2C Get Custom Field Values and Customizable Post Listings work together
-
I′m trying to make an image gallery in my WordPress. I′ve using the excerpt to show the thumbnails of images, but when I make an export of posts, custom fields are saved, but not the excerpts. So, I′ve decided to use custom fields to show the thumbnails, but I can′t make it work with the regular method to show the custom fields content.
With using excerpts for thumbnail, the C2C Customizable Posts Listings was my weapon of choice. I used that piece of code to show the thumbnails:
<?php c2c_get_recent_posts(1000, "<a href='%post_url%'>%post_excerpt%</a>", $cat); ?>
(I use the cat variable to get the category id with <?php $wp_query->query_vars[‘cat’]; ?>)
It works really perfect. But when I decided to get rid of excerpts and start to use custom fields, and the method described on the codex to show the custom field values don′t work for me, I tried the C2C Get Custom Field Values. The problem is to show the values of the custom field inside the c2c_get_recent_post function. I tried this piece of code, but results on a white screen:
<?php c2c_get_recent_posts(1000, "<a href='%post_url%'>" c2c_get_custom('thumbnail', '<p>', '</p>', '') "</a>", $cat); ?>
I still a little noob in PHP, but I think that one function can be called inside another function, but I don′t know how to make that, or if it can be possible.
If someone can help me, I will appreciate it for the rest of eternity.
Thanks.
- The topic ‘How to C2C Get Custom Field Values and Customizable Post Listings work together’ is closed to new replies.