Custom Field Templates with home.php
-
I’m trying to add custom fields to home.php but somehow it doesn’t allow me to use them on that specific page.
Here’s the URL of the website: https://www.haciendadevega.com/wip/
Here’s snippets of what I have on home.php that may be relevant to the issue:
<div class="three-content homepage"> <h1>The Blurb</h1> <?php query_posts('posts_per_page=3'); ?> <ul class="recent"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <li> <h2><?php the_title(); ?></h2> <?php the_excerpt(); ?> <div class="more"> <a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>">Read More</a> </div> </li> <?php endwhile; ?> <?php endif; ?> </ul> </div>
<div class="three-content homepage" style="height:350px;"> <h1>News & Events</h1> <ul class="recentNews"> <li> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/icons/<?php echo get_post_meta($post->ID, 'Icon 1', true) ?>.png" border="0" width="48" height="48" alt="" class="fltlt" /> <h2><?php echo get_post_meta($post->ID, 'Heading 1', true) ?></h2> <p> <?php echo get_post_meta($post->ID, 'Text 1', true) ?> </p> </li> <li> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/icons/<?php echo get_post_meta($post->ID, 'Icon 2', true) ?>.png" border="0" width="48" height="48" alt="" class="fltlt" /> <h2><?php echo get_post_meta($post->ID, 'Heading 2', true) ?></h2> <p> <?php echo get_post_meta($post->ID, 'Text 2', true) ?> </p> </li> <li> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/icons/<?php echo get_post_meta($post->ID, 'Icon 3', true) ?>.png" border="0" width="48" height="48" alt="" class="fltlt" /> <h2><?php echo get_post_meta($post->ID, 'Heading 3', true) ?></h2> <p> <?php echo get_post_meta($post->ID, 'Text 3', true) ?> </p> </li> <li> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/icons/<?php echo get_post_meta($post->ID, 'Icon 4', true) ?>.png" border="0" width="48" height="48" alt="" class="fltlt" /> <h2><?php echo get_post_meta($post->ID, 'Heading 4', true) ?></h2> <p> <?php echo get_post_meta($post->ID, 'Text 4', true) ?> </p> </li> </ul> </div>
I’m not exactly sure what’s going wrong… any help would be VERY appreciated.
- The topic ‘Custom Field Templates with home.php’ is closed to new replies.