Sunday, 15 May 2011

First post in Wordpress blog displays incorrectly -



First post in Wordpress blog displays incorrectly -

i styling wordpress theme , top blog post displays incorrectly. code here:

<div class="bordered centered"> <p class="negative-margin alignleft header"><?php the_title(); ?></p><p class="negative-margin alignright date"><?php the_date(); ?></p><div style="clear:both;"></div> <?php if ( is_search() ) : // display excerpts search ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php if ( has_post_thumbnail() ):?> <div id="entry-left"><?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->id), 'large'); echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >'; echo get_the_post_thumbnail($post->id, 'large'); echo '</a>';?> </div> <div class="entry-right"> <?php the_content( __( 'more <span class="meta-nav">&rarr;</span>', 'huckleberry' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'pages:', 'huckleberry' ), 'after' => '</div>' ) ); ?> </div> <div class="entry-right"> <table> <tr> <td><p class="header">details</p><br /> <?php $my_meta = get_post_meta( $post->id, 'link', false ); ?> <?php if ($my_meta): var_dump($my_meta) ?> <?php foreach ($my_meta $currmeta): ?> <?php if( $currmeta && '' != $currmeta ): $currmeta=explode($currmeta,";",2);?> <a href="<?php echo $my_meta[1] ?>"><?php $my_meta[0];?></a> <?php endif; endforeach; endif; ?> </td> <td> <a href="<?php echo multipostthumbnails::get_post_thumbnail_url(get_post_type(), 'secondary-image');?>"> <?php if (class_exists('multipostthumbnails')) : multipostthumbnails::the_post_thumbnail(get_post_type(), 'secondary-image'); endif; ?> </a> </td> <td> <a href="<?php echo multipostthumbnails::get_post_thumbnail_url(get_post_type(), 'tertiary-image');?>"> <?php if (class_exists('multipostthumbnails')) : multipostthumbnails::the_post_thumbnail(get_post_type(), 'tertiary-image'); endif; ?> </a> </td> <td> <a href="<?php echo multipostthumbnails::get_post_thumbnail_url(get_post_type(), 'fourth-image');?>"> <?php if (class_exists('multipostthumbnails')) : multipostthumbnails::the_post_thumbnail(get_post_type(), 'fourth-image'); endif; ?> </a> <td> </tr> </table> </div>

with relevant css here:

.alignleft { float:left; } .alignright { float:right; } .bordered { border:2px solid black; } .negative-margin { margin-top:-25px; margin-left:5px; background:white; } .header { font-size:200%; } .date { font-size:150%; } .centered { width:640px; margin-left:auto; margin-right:auto; } #entry-left { float:left; width:200px; } .entry-right { float:right; width:430px; }

all other posts have border, title , date on border, top post has border goes on header, so: http://imgur.com/6pe79ro

i'm relatively new wordpress , can't seem figure out what's going on here.

also, i'm trying utilize custom fields display links under "details." thought have key links "link", , value in format "description;url" can break value 2 values have link description , url display. i'm unable display links. help appreciated.

perhaps irrelevant, close next divs? <div class="bordered centered"> , <div id="entry-left">?

this not answering sec questions, custom fields: suggest using great wp module - acf. allows create , read values of custom-created fields easily, coming many more useful features. plugin can found here: http://wordpress.org/extend/plugins/advanced-custom-fields/

wordpress

No comments:

Post a Comment