ata.online
New Member
- Messages
- 159
- Reaction score
- 0
- Points
- 0
Since yesterday, i have been trying to embed html code so that 'Recent Articles' is shown in sidebar 1:
http://www.ataarticles.com/
I referred to the sidebar html code shown at:
http://articlesss.com/article-directory-wordpress-theme/
but no joy there. Everytime i try to include it in sidebar 1, all the content disappears. I know there is a small code which is missing but not sure what it is exactly: When i try to embed the below code it does not show up at all.
<?php } ?>
</ul>
</div>
<?php } ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1') ) : ?>
<h2>Recent Articles</h2>
<?php
$myposts = get_posts('numberposts=5');
foreach($myposts as $post) : setup_postdata($post);
?>
<div class="post">
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="postmetadata"><?php the_time('m.d.y') ?> @ <?php the_category(', ') ?></div>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div><!-- end #l-sidebar -->
http://www.ataarticles.com/
I referred to the sidebar html code shown at:
http://articlesss.com/article-directory-wordpress-theme/
but no joy there. Everytime i try to include it in sidebar 1, all the content disappears. I know there is a small code which is missing but not sure what it is exactly: When i try to embed the below code it does not show up at all.
<?php } ?>
</ul>
</div>
<?php } ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1') ) : ?>
<h2>Recent Articles</h2>
<?php
$myposts = get_posts('numberposts=5');
foreach($myposts as $post) : setup_postdata($post);
?>
<div class="post">
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="postmetadata"><?php the_time('m.d.y') ?> @ <?php the_category(', ') ?></div>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div><!-- end #l-sidebar -->