Add Custom Field

Status
Not open for further replies.

macman

New member
Mar 11, 2008
96
0
0
im trying to add some custom featured posts to my blog home page "picture +half the article" . when writing my posts, i go to the bottom where it says "Custom Fields"

For the "Key" i enter "left feature" there is also top ,right and other featured spots on my home page

and for the Value i enter the url where my picture is saved at "http://mysite.com/wp-content/uploads/2008/09/larry-the-cable-guy.png"

Then i click "Add Custom Field" button .

The picture is where i want it to be " left feature " with the article i posted. but for some reason the article saves as top ,right and left feature post on my home page .and when i try to add a new custom field like "top feature". "top feature" gets saved "pic + article "but the "left feature "is deleted .sorry if this makes no sense i tried to explain it the best i could . can some one please shine some light on this problem. here is the site dailycomedycentral.com
 


That really didn't make sense to me but without knowing what theme....
Its gotta be a css problem I'm guessing, but can't say for sure without seeing the code/theme.
 
sorry , i dont know how to explain it .i nothing about wordpress or coding php


<?php get_header(); ?>

<div id="homepage">

<div id="hpleft">

<div class="hptabber">

<!--This section is where the custom images are found for the homepage tabber - note the custom field name for this image is "top feature". Recommended image size is 125x250, as the stylesheet is written for this size.-->

<?php include(TEMPLATEPATH."/tabber.php");?>

</div>

<div class="hpflickr">

<h4>Featured Photos</h4>
<?php if (function_exists('get_flickrrss')) {get_flickrrss();} ?>

</div>

<div class="homebottomleft">

<!--This section is where the custom images are found for the homepage bottom left - note the custom field name for this image is "left feature". Recommended image size is 260x150, as the stylesheet is written for this size.-->
<!--This section is currently pulling category ID #1, and can be switched by changing the cat=1 to show whatever category ID you would like in this area.-->

<h2>Featured Category</h2>
<?php $recent = new WP_Query("cat=1&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
<?php if( get_post_meta($post->ID, "left feature", true) ): ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "left feature", true); ?>" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/images/homeleft.png" alt="<?php the_title(); ?>" /></a>
<?php endif; ?>
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<?php the_content_limit(175, "[Read more]"); ?>
<?php endwhile; ?><br />

<h3>More Featured Category Posts</h3>
<ul>
<?php $recent = new WP_Query("cat=1&showposts=3&offset=1"); while($recent->have_posts()) : $recent->the_post();?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>

</div>

<div class="homebottomright">

<!--This section is where the custom images are found for the homepage bottom right - note the custom field name for this image is "right feature". Recommended image size is 260x150, as the stylesheet is written for this size.-->
<!--This section is currently pulling category ID #1, and can be switched by changing the cat=1 to show whatever category ID you would like in this area.-->

<h2>Featured Category</h2>
<?php $recent = new WP_Query("cat=1&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
<?php if( get_post_meta($post->ID, "right feature", true) ): ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "right feature", true); ?>" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/images/homeright.png" alt="<?php the_title(); ?>" /></a>
<?php endif; ?>
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<?php the_content_limit(175, "[Read more]"); ?>
<?php endwhile; ?><br />

<h3>More Featured Category Posts</h3>
<ul>
<?php $recent = new WP_Query("cat=1&showposts=3&offset=1"); while($recent->have_posts()) : $recent->the_post();?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>

</div>

</div>

<?php include(TEMPLATEPATH."/sidebar_home.php");?>

</div>

<!-- The main column ends -->

<?php get_footer(); ?>
 
Just a quick thought.

From your code..
<!--This section is currently pulling category ID #1, and can be switched by changing the cat=1 to show whatever category ID you would like in this area.-->

Maybe the post you're posting has a different category ID and that's why it's not showing?
 
i just tried changing the category ID to my new ones like p=56 which is my david spade post . but nothing happens
 
Status
Not open for further replies.