Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112726

wp-krud on "php custom fields not working on home page"

$
0
0

Hey guys,

I am trying to add the custom field "market" into the a href"" as links, which is working great on pages, however is not working on my home page.

Here is the home page where it's not working (the latest releases - as you can see the custom field is not coming through - it directs you to a blank link): http://a.bbtdesigns.com

And where it is working: http://a.bbtdesigns.com/themes-by-series

The php is identical for both.

<a class="ico full" <?php echo $direct_url_new_tab; ?> href="<?php
						$key = get_post_meta($post->ID, 'blogpost', true);
						if ($key == '')
						{ ?><?php $key1="market"; echo get_post_meta($post->ID, $key1, true); ?>
							<?php } else { ?>
							<?php $key="blogpost"; echo get_post_meta($post->ID, $key, true); ?><?php } ?>" <?php echo $enable_pretty_photo . ' ' . $pretty_photo_title; ?>></a>

For the home page, the php is in the functions.php file, and for the theme-by-series page the php is in the page's .php file.

Any ideas why it's not working?


Viewing all articles
Browse latest Browse all 112726