Closed GoogleCodeExporter closed 9 years ago
the major problem that this minor problem has uncovered is that the / is
removed each time.
all code become non xhtml.
e.g
<br /> becomes <br >,
<img src="http://thumbimage/example.jpg "/> becomes <img
src="http://thumbimage/example.jpg ">
Original comment by Spartans...@googlemail.com
on 1 Aug 2009 at 3:04
This does not appear to be a Carrington issue, it's a general WordPress/PHP
issue.
Original comment by alexking...@gmail.com
on 2 Aug 2009 at 11:39
I totally disagree with the comments here. This has nothing to do with the /
being
removed. The get_post_meta() is returned empty.
Do this: Create a post and add a custom field of foo with a value of bar.
Then add
this to any of the post templates:
<?php echo get_post_meta($post->ID, 'foo', true); ?>
The result should be 'bar'
But it is ''
Thanks
Original comment by husky.bi...@gmail.com
on 17 Sep 2009 at 11:09
I'm with husky.biped on this one as well - I just cannot convince content-
default.php to accept any known form of get_post_meta(), it always turns up
empty.
However, inserting the same code (see below) into single.php of the default
Wordpress 2.8.4 theme bring up the expected result. I would love to have this
fixed
in the otherwise excellent JAM theme ;)
$year = get_post_meta($post->ID, 'Year', true);
echo $year;
Original comment by lukescam...@gmail.com
on 23 Sep 2009 at 1:47
[deleted comment]
Hey Lukescammell,
Alex clued me in on another forum that this is an issue of variable scope:
http://carringtontheme.com/2009/06/remember-variable-scope/
It works perfectly now, and I have a feeling it will work for you too..
Original comment by husky.bi...@gmail.com
on 23 Sep 2009 at 3:32
Perfect Husky, thanks! This now works just as I always assumed it would! I must
have
missed this in the Carrington documentation somewhere...
global $post;
$year = get_post_meta($post->ID, 'Year', true);
echo $year;
Original comment by lukescam...@gmail.com
on 23 Sep 2009 at 11:51
Original issue reported on code.google.com by
Spartans...@googlemail.com
on 1 Aug 2009 at 11:06