Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter lash666

    (@lash666)

    Thanks for your advice.

    You are right, using H1 is not a good idea.

    Anyway, your code is working perfectly, you have made my day.

    Thanks one more time mate!

    Thread Starter lash666

    (@lash666)

    Thank you very much! That is what I was looking for.
    But now, Category name and Number of posts is in the same row:

    <li class="cat-item">
    <a title="Show all posts form Category Name" href="/category">Category Name  Posts: 52</a>

    I would like to displey numbers under. Should I add </ br> somewhere?
    I was thinking about definding different style for Category Name e.g. <h1> and different for Posts in Category e.g. <p>.

    Something like that:

    <div class="categories">
    
    	           <ul>
    
    <?php
    $variable = wp_list_categories('title_li&echo=0&show_count=1');
    
    $variable = str_replace( '</a>', ' ', $variable); //remove the closing </a> tag here
    $variable = str_replace( '(', '<p>Posts: ', $variable);
    $variable = str_replace( ')', '</p></a>', $variable); //insert the closing </a> tag after the number
    echo $variable;
    ?>   
    
    	           </ul>
    
    </div>

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)