Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 14th Jan 2014, 08:54 AM   #1
Warrior Member
 
Join Date: 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Problem developing worpress blog template
Share on: 
fb share twitter share gplus share more share

Hi,

Unfortunately my wordpress theme has no wordpress loop/blog. I'm working on a blog template in wordpress and I'm trying to get a few posts on one page with each post the same style with a little space between them. Unfortunately all posts are loaded into just one frame and not separate.

This is logical because the wordpress loop is in this case programmed between the divs who are referring to the css.

Can somebody tell me or put me in the right direction to make sure each post have his own framework?

Thanks in advance,
Hans

P.s. Here is the code I'm using

<?php

?>
<?php get_header(); ?>
<div id="bg">
<div id="content">
<div class="inner-index2">
<div class="jogobingo-index">
<article>

<?php // Display blog posts on any page @ Display Blog Posts on any Page (with navigation) | Digging Into WordPress
$temp = $wp_query; $wp_query= null;
$wp_query = new WP_Query(); $wp_query->query('showposts=1' . '&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

<h3><a href="<?php the_permalink(); ?>" title="Read more"><?php the_title(); ?></a></h3>
</div>
<div class="titel">
<?php the_excerpt(); ?>

<?php endwhile; ?>

<?php if ($paged > 1) { ?>

<nav id="nav-posts">
<div class="prev"><?php next_posts_link('&laquo; Previous Posts'); ?></div>
<div class="next"><?php previous_posts_link('Newer Posts &raquo;'); ?></div>
</nav>

<?php } else { ?>

<nav id="nav-posts">
<div class="prev"><?php next_posts_link('&laquo; Previous Posts'); ?></div>
</nav>

<?php } ?>

<?php wp_reset_postdata(); ?>

</div>
</div>
</div>

</article>

<img class="bg_bottom" alt="" src="<?php bloginfo ('template_directory'); ?>/images/Realbingo_homepage-content.png" />
</div>

<?php get_footer(); ?>
snahtter is offline  
Unread 14th Jan 2014, 11:01 PM   #2
Developer | Entrepreneur
War Room Member
 
danielml's Avatar
 
Join Date: 2013
Posts: 6
Thanks: 11
Thanked 8 Times in 6 Posts
Default
Re: Problem developing worpress blog template
Share on: 
fb share twitter share gplus share more share

Ok, Looks like, for starters, your divs are not properly nested.
I didn't test it, but try this.

<?php get_header(); ?>
<div id="bg">
<div id="content">
<div class="inner-index2">
<div class="jogobingo-index">
<article>

<?php // Display blog posts on any page @ Display Blog Posts on any Page (with navigation) | Digging Into WordPress
$temp = $wp_query; $wp_query= null;
$wp_query = new WP_Query(); $wp_query->query('showposts=1' . '&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="my_post">
<h3><a href="<?php the_permalink(); ?>" title="Read more"><?php the_title(); ?></a></h3>
<div class="titel">
<?php the_excerpt(); ?>
</div>
</div>

<?php endwhile; ?>

<?php if ($paged > 1) { ?>

<nav id="nav-posts">
<div class="prev"><?php next_posts_link('&laquo; Previous Posts'); ?></div>
<div class="next"><?php previous_posts_link('Newer Posts &raquo;'); ?></div>
</nav>

<?php } else { ?>

<nav id="nav-posts">
<div class="prev"><?php next_posts_link('&laquo; Previous Posts'); ?></div>
</nav>

<?php } ?>

<?php wp_reset_postdata(); ?>

</article>
</div>
</div>
</div>

<img class="bg_bottom" alt="" src="<?php bloginfo ('template_directory'); ?>/images/Realbingo_homepage-content.png" />
</div>

<?php get_footer(); ?>
danielml is offline  
Closed Thread


Bookmarks

Tags
blog, developing, problem, template, worpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 10:02 AM.