Unable to create custom field link in custom template
-
Please help! I have setup a custom field to link to the press release associated with each deal on this page: http://www.vfpfinancial.com/news/deal/
The problem is that the links are not working and my PHP knowledge is very basic. The added div is:
<div class=”news-deal-link”>
Here is the template code:
<?php
/*
Template Name: funding deals
*/
?><?php get_template_parts( array( ‘parts/shared/html-header’, ‘parts/shared/header’ ) ); ?>
<h2 class=”post-title”><?php the_title(); ?></h2>
<?php
//$temp = $wp_query;
//$wp_query= null;
//$wp_query = new WP_Query();
$args = array();
$args[‘post_type’] = ‘funding_deal’;
$args[‘orderby’] = ‘funding_date’;
$args[‘order’] = ‘DESC’;
//$args[‘limit’] = 10;
//$args[‘paginate’] = TRUE;$Q = new GetPostsQuery($args);
$results = $Q->get_posts();//print_r($results);
//$wp_query->query($args);
//while ($wp_query->have_posts()) : $wp_query->the_post();
//$post = $wp_query->post;
foreach($results as $i => $p):
?>
<?php if($i>1 && $i % 3 === 0): ?>
<div class=”cf”></div>
<?php endif; ?>
<div class=”news-deal”>
<h2 class=”news-deal-title”><?php print $p[‘post_title’] ?></h2>
<div class=”news-deal-amount”><?php print $p[‘funding_amount’] ?></div>
<div class=”news-deal-bottom”>
<div class=”news-deal-desc”><?php print $p[‘funding_desc’] ?></div><div class=”news-deal-link”>
” target=”_blank”>Press Release
</div><div class=”news-deal-date”><?php print $p[‘funding_date’] ?></div>
</div></div>
<?php endforeach; ?>
<?php //endwhile; ?>
<?php if(function_exists(‘wp_paginate’)) {
//wp_paginate(‘range=4&anchor=2&nextpage=Next&previouspage=Previous’);
} ?><?php //$wp_query = null; $wp_query = $temp;?>
<?php get_template_parts( array( ‘parts/shared/footer’,’parts/shared/html-footer’) ); ?>
Thank you for any help!!!
http://wordpress.org/extend/plugins/custom-content-type-manager/
- The topic ‘Unable to create custom field link in custom template’ is closed to new replies.