I modifying a wordpress template to be left with two columns on the main page with the following structure:
But the first 4 are of a category and the last 4 of another
The index code is:
http://pastebin.com/dMC0saBN
The page is (Columns are made, but all they do is repeat the post. They haven't order or filter)
crossfitlascondes.cl
The solution I occurred was to create two loops on the page and separated by , one to right column and one to left column. And so I can handle the code for each loop independently without interfering with the other column.
The code of index is:
<?php get_header();?>
<div id="contentslide">
<?php
include(TEMPLATEPATH . '/slide.php');
?>
</div>
<?php
get_sidebar();
?>
<div id="content">
<div class="clear">
</div>
<div id="contentleft">
<div id="noticias">Noticias</div>
<?php if ( is_home() ) { query_posts($query_string . '&cat=-27'); } ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="postleft" id="post-<?php
the_ID();
?>">
<div class="title">
<h2><a href="<?php
the_permalink();
?>" rel="bookmark" title="Permanent Link to <?php
the_title();
?>"><?php
the_title();
?></a></h2>
</div>
<div class="postmeta">
<span class="author">Posted by <?php
the_author();
?> </span> <span class="clock"> <?php
the_time('M - j - Y');
?></span> <span class="comm"><?php
comments_popup_link('0 Comment', '1 Comment', '% Comments');
?></span>
</div>
<div class="entry">
<?php
if (has_post_thumbnail()) {
?>
<a href="<?php
the_permalink();
?>"><img class="postimgleft" src="<?php
bloginfo('stylesheet_directory');
?>/timthumb.php?src=<?php
get_image_url();
?>&h=150&w=200&zc=1" alt=""/></a>
<?php
} else {
}
?>
<?php
wpe_excerpt('wpe_excerptlength_index', '');
?>
<div class="clear">
</div>
</div>
</div>
<?php
endwhile;
?>
<?php
endif;
?>
<?php
wp_reset_query();
?>
<div class="navigation">
<div class="alignleft"><?php previous_posts_link('« Previous Entries') ?></div>
<div class="alignright"><?php next_posts_link('Next Entries »','') ?></div>
</div>
</div>
<div id="contentright">
<div id="wod">WOD Diario</div>
<?php if ( is_home() ) { query_posts($query_string . '&cat=27&'); } ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="postright" id="post-<?php
the_ID();
?>">
<div class="title">
<h2><a href="<?php
the_permalink();
?>" rel="bookmark" title="Permanent Link to <?php
the_title();
?>"><?php
the_title();
?></a></h2>
</div>
<div class="postmeta">
<span class="author">Posted by <?php
the_author();
?> </span> <span class="clock"> <?php
the_time('M - j - Y');
?></span> <span class="comm"><?php
comments_popup_link('0 Comment', '1 Comment', '% Comments');
?></span>
</div>
<div class="entry">
<?php
if (has_post_thumbnail()) {
?>
<a href="<?php
the_permalink();
?>"><img class="postimgright" src="<?php
bloginfo('stylesheet_directory');
?>/timthumb.php?src=<?php
get_image_url();
?>&h=150&w=200&zc=1" alt=""/></a>
<?php
} else {
}
?>
<?php
wpe_excerpt('wpe_excerptlength_index', '');
?>
<div class="clear">
</div>
</div>
</div>
<?php
endwhile;
?>
<div class="clear"></div>
<?php
else:
?>
<h1 class="title">Not Found</h1>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php
endif;
?>
<div class="navigation">
<div class="alignleft"><?php previous_posts_link('« Previous Entries') ?></div>
<div class="alignright"><?php next_posts_link('Next Entries »','') ?></div>
</div>
<?php
wp_reset_query();
?>
</div>
</div>
<?php
get_footer();
?>
and the code CSS(summarized) is
#content {
float:left;
width: 665px;
height:100%;
padding:10px 0px 0px 0px;
margin:23px 0px 0px 15px;
display:inline;
overflow:hidden;
}
#contentleft {
float:left;
width: 50%;
height:100%;
display:inline;
overflow:hidden;
}
#contentright {
float:left;
width: 44%;
margin-left: 23px;
height:100%;
display:inline;
overflow:hidden;
}
#contentslide {
float:left;
width: 665px;
height:100%;
padding:10px 0px 0px 0px;
margin:35px 0px 0px 15px;
display:inline;
overflow:hidden;
}
Related
Seems like a silly question, but I can't display posts in three columns.
I was using this code with bootstrap, but I can't anymore because it somehow breaks other parts of my page. I had to change it.
<div class="row" style="margin-top:-30px">
<?php
$count=0;
query_posts('posts_per_page=9');
while (have_posts()) : the_post();
?>
<div class="col-sm-4 blog-post thumb">
<?php get_template_part('content-noticias', get_post_format()); ?>
</div>
<?php
$count++;
if($count == 3 || $count == 6 ) echo '</div><div class="row">';
endwhile;
?>
</div>
It would do the work, but not anymore because of that. How to display my posts in columns without bootstrap? Just for information, my content-noticias is:
<div class="noticias">
<?the_post_thumbnail();?>
<h1 style="margin-top:-30px"><?php the_title(); ?></h1>
<div><p><?php echo wp_trim_words( get_the_content(), 50 ); ?></p></div>
</div>
</div>
Hey man for row you can use css property flex-flow: row wrap; and for child items flex-basis: 33%; and any of your items in your post loop will be in 3 columns , and you can change flex basis for other mediaquery for change sie on mobile for example, check this out !
.container {
max-width: 1335px;
margin: 0 auto;
}
.grid-row {
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
}
.grid-item {
height: 250px;
flex-basis: 33%;
-ms-flex: auto;
width: 250px;
position: relative;
padding: 10px;
box-sizing: border-box;
background-color: #ededed;
border: 1px solid white;
}
#media(max-width: 1333px) {
.grid-item {
flex-basis: 33.33%;
}
}
#media(max-width: 1073px) {
.grid-item {
flex-basis: 33.33%;
}
}
#media(max-width: 815px) {
.grid-item {
flex-basis: 33%;
}
}
#media(max-width: 555px) {
.grid-item {
flex-basis: 100%;
}
}
<div class='container'>
<div class='grid-row'>
<div class='grid-item'>
<div class="noticias">
<a href="<?php the_permalink(); ?>">
<?the_post_thumbnail();?>
</a>
<h1 style="margin-top:-30px"><?php the_title(); ?></h1>
<div>
<p>
<?php echo wp_trim_words( get_the_content(), 50 ); ?>
</p>
</div>
</div>
</div>
<div class='grid-item'>
<div class="noticias">
<a href="<?php the_permalink(); ?>">
<?the_post_thumbnail();?>
</a>
<h1 style="margin-top:-30px"><?php the_title(); ?></h1>
<div>
<p>
<?php echo wp_trim_words( get_the_content(), 50 ); ?>
</p>
</div>
</div>
</div>
<div class='grid-item'>
<div class="noticias">
<a href="<?php the_permalink(); ?>">
<?the_post_thumbnail();?>
</a>
<h1 style="margin-top:-30px"><?php the_title(); ?></h1>
<div>
<p>
<?php echo wp_trim_words( get_the_content(), 50 ); ?>
</p>
</div>
</div>
</div>
<div class='grid-item'>
<div class="noticias">
<a href="<?php the_permalink(); ?>">
<?the_post_thumbnail();?>
</a>
<h1 style="margin-top:-30px"><?php the_title(); ?></h1>
<div>
<p>
<?php echo wp_trim_words( get_the_content(), 50 ); ?>
</p>
</div>
</div>
</div>
<div class='grid-item'>
<div class="noticias">
<a href="<?php the_permalink(); ?>">
<?the_post_thumbnail();?>
</a>
<h1 style="margin-top:-30px"><?php the_title(); ?></h1>
<div>
<p>
<?php echo wp_trim_words( get_the_content(), 50 ); ?>
</p>
</div>
</div>
</div>
<div class='grid-item'>
<div class="noticias">
<a href="<?php the_permalink(); ?>">
<?the_post_thumbnail();?>
</a>
<h1 style="margin-top:-30px"><?php the_title(); ?></h1>
<div>
<p>
<?php echo wp_trim_words( get_the_content(), 50 ); ?>
</p>
</div>
</div>
</div>
</div>
</div>
The problem is in your $count if statement:
if($count == 3 || $count == 6 ) echo '</div><div class="row">'; <-- THIS WILL NEVER CLOSE
What you can do is this:
<div class="row" style="margin-top:-30px">
<?php
query_posts('posts_per_page=9');
while (have_posts()) : the_post();
?>
<div class="col-sm-4 blog-post thumb">
<?php get_template_part('content-noticias', get_post_format()); ?>
</div>
<?php endwhile;?>
</div>
Then you can use CSS to make sure your columns stay intact:
.row .blog-post:nth-child(3n+1) {
clear: left;
}
That will make sure that every third element will clear so if one of the columns is longer or shorter, it won't mess with the layout.
I created the design that will be used to show first post differently from the others. It's not that easy because the first post needs to be in his own div id, which is completely different from the other posts.
Here is the code I currently use in wordpress php:
<?php get_header(); ?>
<!-- Begin Content -->
<div id="content-wide">
<div class="post">
<div class="imgwide" style="background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8)), url(<?php echo catch_that_image() ?>); background-repeat: no-repeat; background-size: 100%; background-position: center;">
<div class="p-heading">
<h1>
<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a>
</h1>
<div class="p-content">
Excerpt text of the first post goes here but php the_excerpt doesnt work for this wide paragraph
</div>
</div>
</div>
</div>
</div>
<div id="content-a">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<div class="imgdiv"><img src="<?php echo catch_that_image() ?>" width="250"></div>
<div class="p-heading">
<h1>
<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a>
</h1>
</div>
<div class="p-content">
<?php the_excerpt(); ?>
</div>
<div class="p-info">
<?php the_time('j.m.Y') ?> |
<?php the_category(', '); ?> | <img src="http://www.virmodrosti.com/wp-content/uploads/comments.png" alt="Komentarji" width="26" height="12">
<?php $totalcomments = get_comments_number(); echo $totalcomments; ?>
</div>
</div>
<?php endwhile; ?>
and here is my site url http://www.virmodrosti.com/zdravje/
All I want is that first post isn't displayed twice, but is only moved to the wide post design. The big post is in content-wide. Let me know how to do that. Thank you.
try to add a counter that starts in zero and increment it inside your while loop, then use if else statement to check the value of counter if zero display the first post else the other posts.
EDITED
<?php $counter = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<?php if($counter == 0) { ?>
<div id="content-wide">
<div class="post">
<div class="imgwide" style="background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8)), url(<?php echo catch_that_image(); ?>); background-repeat: no-repeat; background-size: 100%; background-position: center;">
<div class="p-heading">
<h1><?php the_title(); ?></h1>
<div class="p-content">
<?php the_excerpt(); ?>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<?php if($counter > 0) { ?>
<div class="post">
<div class="imgdiv"><img src="<?php echo catch_that_image() ?>" width="250"></div>
<div class="p-heading">
<h1><?php the_title(); ?></h1></div>
<div class="p-content">
<?php the_excerpt(); ?>
</div>
<div class="p-info">
<?php the_time('j.m.Y') ?> |
<?php the_category(', '); ?> | <img src="http://www.virmodrosti.com/wp-content/uploads/comments.png" alt="Komentarji" width="26" height="12">
<?php $totalcomments = get_comments_number(); echo $totalcomments; ?>
</div>
</div>
<?php } ?>
<?php $counter ++; ?>
<?php endwhile; ?>
I tried to use wordpress function query_posts('showposts=3&cat=1') to display the latest posts under category 1. But it displays 4 or 5 posts. Could you please help figure out the root cause? Thanks.
<?php query_posts('showposts=3&cat=17');?>
<div class="n-placement n-widget w-image-text" data-type="image-text" id="u-aabm">
<div class="n-inner" id="u-aabm-i">
<div class="w-image-text-container">
<span class="w-image-text-image" style="float: left; clear: left; margin-top: 6px; margin-bottom: 6px; margin-right: 6px;">
<img src="<?php echo catch_that_image();?>" height="112" width="112"/>
</span>
<div class="w-image-text-text">
<b>
<!--<?php the_title(); ?>-->
<?php the_title(); ?>
</b>
<div>
<div>
<?php
if(is_category() || is_archive() || is_home() ) {
the_excerpt();
} else {
the_content('Read the rest of this entry »');
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
You need to start the loop after you define the query_posts().
So the code becomes:
<?php query_posts('showposts=3&cat=17');
while (have_posts()) : the_post(); ?>
<div class="n-placement n-widget w-image-text" data-type="image-text" id="u-aabm">
<div class="n-inner" id="u-aabm-i">
<div class="w-image-text-container">
<span class="w-image-text-image" style="float: left; clear: left; margin-top: 6px; margin-bottom: 6px; margin-right: 6px;">
<img src="<?php echo catch_that_image();?>" height="112" width="112"/>
</span>
<div class="w-image-text-text">
<b>
<!--<?php the_title(); ?>-->
<?php the_title(); ?>
</b>
<div>
<div>
<?php
if(is_category() || is_archive() || is_home() ) {
the_excerpt();
} else {
the_content('Read the rest of this entry »');
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
I'm modifying a wordpress site that's got the iPin theme (pinterest-style infinite scrolling theme) installed.
I want the first four "pins" to show specific links, and then after that for all the "pins" to be the natural flow of blog posts.
Instead, the first four are successfully displaying how I want, but then when you scroll down and the site load more pins, those same 'specific link' pins come up again, and then again when you scroll down again.
This is the page I'm working with (please excuse the messiness - early stages of construction)
I tried making a string that changes once the four links are displayed and basically says "if it has changed don't show the links" but that didn't work at all.
Can anyone help me?
Thanks in advance - here's the total code from my index.php:
<?php get_header(); ?>
<div class="container-fluid" style="width: 1100px; margin-left:auto; margin-right: auto;">
<div id="ajax-loader-masonry" class="ajax-loader"></div>
<div id="masonry">
<?php //"create a pod about yourself" link <=====this is the first 'specific link' pin
?>
<div style="overflow:hidden; width: 220px; height:100px; padding:0px;background-color:#DDD;" <?php post_class('thumb');?> >
<div class="thumb-holder">
<a href="create-a-pod-about-yourself" class="create-a-pod-about-yourself-link-pod" style="padding:7px;">
<p class="create-a-pod-about-yourself-link-pod">Add pod:<br/>Introduce yourself<br/><br/></p></a>
</div>
</div>
<?php //"create a project pod" link <=====this is the second 'specific link' pin
?>
<div style="overflow:hidden; width: 220px; height:100px; padding:0px;background-color:#DDD;" <?php post_class('thumb');?> >
<div class="thumb-holder">
<a href="create-a-project-pod" class="create-a-project-pod-link-pod" style="padding:7px;">
<p class="create-a-project-pod-link-pod">Add pod:<br/>Promote a project<br/><br/></p></a>
</div>
</div>
<?php //"create an idea pod" link <=====this is the third 'specific link' pin
?>
<div style="overflow:hidden; width: 220px; height:100px; padding:0px;background-color:#DDD;" <?php post_class('thumb');?> >
<div class="thumb-holder">
<a href="create-an-idea-pod" class="create-an-idea-pod-link-pod" style="padding:7px;">
<p class="create-an-idea-pod-link-pod">Add pod:<br/>Share an idea<br/><br/></p></a>
</div>
</div>
<?php //"create a question pod" link <=====this is the fourth 'specific link' pin
?>
<div style="overflow:hidden; width: 220px; height:100px; padding:0px;background-color:#DDD;" <?php post_class('thumb');?> >
<div class="thumb-holder">
<a href="create-a-question-pod" class="create-a-question-pod-link-pod" style="padding:7px;">
<p class="create-a-question-pod-link-pod">Add pod:<br/>Ask a question<br/><br/></p></a>
</div>
</div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php //====now begins the infinitely scrolling list of normal blog posts
?>
<div id="post-<?php the_ID(); ?>"<?php post_class('thumb');?> style="padding:0px; background-color:
<?php $category = get_the_category($postID);
foreach (get_the_category() as $category) {
if($category->name=='People'){
echo '#FCC';
}
else if($category->name=='Projects'){
echo '#CCF';
}
else if($category->name=='Ideas'){
echo '#CFC';
}
}
?>
;">
<div class="thumb-holder">
<?php// if($category->name=='People'){
?>
<div class="masonry-actionbar">
<a class="btn btn-mini" href="<?php the_permalink(); ?>/#respond"><i class="icon-comment"></i> <?php _e('Comment', 'ipin'); ?></a>
<a class="btn btn-mini" href="<?php the_permalink(); ?>"><?php _e('View', 'ipin'); ?> <i class="icon-arrow-right"></i></a>
</div>
<a href="<?php the_permalink(); ?>">
<?php
if (has_post_thumbnail()) {
$imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'medium');
$imgwidth = $imgsrc[1];
$imgheight = $imgsrc[2];
$imgsrc = $imgsrc[0];
} elseif ($postimages = get_children("post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=0")) {
foreach($postimages as $postimage) {
$imgsrc = wp_get_attachment_image_src($postimage->ID, 'medium');
$imgwidth = $imgsrc[1];
$imgheight = $imgsrc[2];
$imgsrc = $imgsrc[0];
}
} elseif (preg_match('/<img [^>]*src=["|\']([^"|\']+)/i', get_the_content(), $match) != FALSE) {
$imgsrc = $match[1];
} else {
$imgsrc = get_template_directory_uri() . '/img/blank.gif';
}
?>
<img src="<?php echo $imgsrc; $imgsrc = ''; ?>" alt="<?php the_title_attribute(); ?>" style="<?php if ($imgwidth != '') { ?>width:220px;height:<?php echo round(220/$imgwidth*$imgheight); ?>px;<?php } else { ?>width:220px;height:220px;<?php } ?>" />
</a>
</div>
<div class="thumbtitle" style="font-size:16px; font-weight: bold; COLOR:#ee4949;"><?php the_title(); ?></div>
<div class="thumbtitle"><?php the_content(); ?></div>
<div class="masonry-meta<?php $show_avatars = get_option('show_avatars'); $comments_number = get_comments_number(); if ($comments_number == 0 && $show_avatars == '0') { echo ' text-align-center'; } ?>">
<?php if ($show_avatars == '1') { ?>
<div class="masonry-meta-comment">
<?php } ?>
<span class="masonry-meta-content" style="font-size:15px;"><?php the_category(', '); ?></span>
<?php if ($show_avatars == '1') { ?>
</div>
<?php } ?>
</div>
<?php
if ('0' != $frontpage_comments_number = of_get_option('frontpage_comments_number')) {
$args = array(
'number' => $frontpage_comments_number,
'post_id' => $post->ID,
'status' => 'approve'
);
$comments = get_comments($args);
foreach($comments as $comment) {
?>
<div class="masonry-meta">
<?php if ($show_avatars == '1') { ?>
<div class="masonry-meta-avatar"><?php echo get_avatar( $comment->comment_author_email , '30'); ?></div>
<div class="masonry-meta-comment">
<?php } ?>
<span class="masonry-meta-author"><?php echo $comment->comment_author; ?></span>
<?php echo $comment->comment_content; ?>
<?php if ($show_avatars == '1') { ?>
</div>
<?php } ?>
</div>
<?php
}
if ($comments_number > $frontpage_comments_number) {
?>
<div class="masonry-meta text-align-center">
<span class="masonry-meta-author">
<?php _e('View all', 'ipin'); ?> <?php echo $comments_number; ?> <?php _e('comments', 'ipin') ?>
</span>
</div>
<?php }
} ?>
</div>
<?php
endwhile;
else :
?>
<div class="row-fluid">
<div class="span3"></div>
<div class="span6">
<div class="post-wrapper">
<div class="h1-wrapper">
<h1><?php _e( 'No Items Found', 'ipin' ); ?></h1>
</div>
<div class="post-content text-align-center">
<p><?php _e('Perhaps searching will help.', 'ipin'); ?></p>
<?php get_search_form(); ?>
</div>
</div>
</div>
<div class="span3"></div>
</div>
<?php endif; ?>
</div>
<div id="navigation">
<ul class="pager">
<li id="navigation-next"><?php next_posts_link(__('« Previous', 'ipin')) ?></li>
<li id="navigation-previous"><?php previous_posts_link(__('Next »', 'ipin')) ?></li>
</ul>
</div>
<div id="scrolltotop"><i class="icon-chevron-up"></i><br /><?php _e('Top', 'ipin'); ?></div>
</div>
<?php get_footer(); ?>
I'm trying to paginate a current category. But when I go to the next page, wordpress not show only all post of the current category, wordpress show all post of all categories. Somebody can help me?
Category.php
<!-- loop -->
<?php $cat_ID = get_query_var('cat'); ?>
<?php query_posts('&cat=<' . $cat_ID . '&showposts=6'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="col-sm-12 col-md-6 col-xs-12 col-lg-4">
<div class="thumbnail">
<article>
<?php the_post_thumbnail('photo-thumbnail') ?>
<div class="caption">
<h3><?php the_title(); ?></h3>
<!-- añade custom field autor del relato -->
</div>
</article>
</div>
<div class="thumbnailFooter">
<div class="pull-left" style="margin-bottom: 4px;">
<?php echo get_avatar(get_the_author_meta('ID'), 32); ?>
</div>
<div class="smallFont pull-left" style="margin-left: 5px; width: 270px;">
<span class="blue bold"><?php the_author(); ?></span>
</div>
<div class="verySmallFont pull-left" style="margin-left: 5px; margin-top: -3px;">
en <?php the_category(none); ?> el <?php the_date(); ?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php my_pagination(); ?>
<?php else : ?>
<?php endif; ?>
<!-- / fin del loop -->
Function.php
<?php
if (!function_exists('my_pagination')) :
function my_pagination() {
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links(
array(
'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
'format' => '?paged=%#%',
'current' => max(1, get_query_var('paged')),
'total' => $wp_query->max_num_pages,
'prev_text' => __('« Anterior'),
'next_text' => __('Siguiente »'),
)
);
}
endif;
EDIT::::::::::
After do suggested changes (but don't works). Wordpress not limit 5 post per page and the paginator not appear.
<!-- loop de post -->
<?php
$project_category = wp_get_post_categories($post->ID); ?>
<?php $query = new WP_Query(array('posts_per_page' => 5)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="col-sm-12 col-md-6 col-xs-12 col-lg-4">
<div class="thumbnail">
<article>
<?php the_post_thumbnail('photo-thumbnail') ?>
<div class="caption">
<a href="<?php the_permalink(); ?>">
<h3 style="font-weight:bold; margin-top: 0px; line-height: 1.3;"><?php the_title(); ?></h3>
</a>
<!-- añade custom field autor del relato -->
</div>
</article>
</div>
<div class="thumbnailFooter">
<div class="pull-left" style="margin-bottom: 4px;">
<?php echo get_avatar(get_the_author_meta('ID'), 32); ?>
</div>
<div class="smallFont pull-left" style="margin-left: 5px; width: 270px;">
<span class="blue bold"><?php the_author(); ?></span>
</div>
<div class="verySmallFont pull-left" style="margin-left: 5px; margin-top: -3px;">
en <span class="bold gray"><?php the_category(none); ?></span>
el <?php the_date(); ?>
</div>
</div>
</div>
<?php endwhile; ?>
<div style="text-align: right; padding-right: 12px;">
<?php my_pagination(); ?>
</div>
<?php else : ?>
<?php endif; ?>
<!-- / fin del loop -->
You seem to have a left angle bracket < inside your query_posts function. Try removing that.