0
votes

hello i just want to ask that can anyone write simple codes for inserting categories, archives ,meta and posts in a specific divs? i placed a code for post in a div that look like this:

<div id="Blogroll">
   <h1>Blogroll</h1>
   <ul>

<li>
      <?php if (have_posts()) :
while (have_posts()) :
 the_post();
 the_content();
 endwhile;

endif; ?>

</li>

   </ul>
  </div><!--end of blogroll-->

the problem is that post content is getting out of div.i have set its css but still.

plus this the code for post please write code for inserting meta, catagories title and archives.

1

1 Answers

0
votes

How about using somthing like code located inside the default theme file - sidebar.php

Print your Archives

<h2>Archives</h2>
<ul>
  <?php wp_get_archives('type=monthly'); ?>
</ul>

Print The Meta Info

<h2>Meta</h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://gmpg.org/xfn/">XFN</a></li>
<li><a href="http://wordpress.org/">WordPress</a></li>
<?php wp_meta(); ?>
</ul>

print Your categories

<?php wp_list_categories('show_count=0&title_li=<h2>Categories</h2>'); ?>

hopefully this should print out what you need..

Marty.