get_post_custom() issue
-
I have tried everything to get the custom fields to display below my posts. I am very new to this stuff so I don’t know what I am doing wrong. I am trying to modify my single.php by adding get_post_custom()
I have tried many variations but here is one of the examples of the loop in my single.php
<?php
if (have_posts()){
/* Display navigation to next/previous posts when applicable */
if (theme_get_option(‘theme_top_single_navigation’)) {
theme_page_navigation(
array(
‘next_link’ => theme_get_previous_post_link(‘« %link’),
‘prev_link’ => theme_get_next_post_link(‘%link »’)
)
);
}while (have_posts())
{
the_post();
get_template_part(‘content’, ‘single’);
$custom_fields = get_post_custom();
comments_template();
}/* Display navigation to next/previous posts when applicable */
if (theme_get_option(‘theme_bottom_single_navigation’)) {
theme_page_navigation(
array(
‘next_link’ => theme_get_previous_post_link(‘« %link’),
‘prev_link’ => theme_get_next_post_link(‘%link »’)
)
);
}} else {
theme_404_content();
}
?>Was hoping someone could point out what I am doing wrong or do I need to modify another file as well like my functions.php?
- The topic ‘get_post_custom() issue’ is closed to new replies.