Hero section for category

Support Area Forums Elite Hero section for category

Viewing 14 posts - 26 through 39 (of 39 total)
URL to the page in question: http://
  • Author
    Posts
  • #32468
    Bill Robbins
    Moderator

    I haven’t tried to display content only on the first page of an archive. There is a topic in the WP.org forums that indicates this might do that:

    
    <?
    if (is_category()) {
      $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
      if ($page == 1) {
        echo category_description();
      }
    }
    ?>
    

    But it’s not something that I’ve tested.


    Give this a shot too:

    
    .category #content article {
    	padding-bottom: 0;
    }
    

    Take care,
    Bill

    #32480

    And where i put this code ?

    #32482
    Bill Robbins
    Moderator

    The top one would go in place of

    
    <?php the_archive_description( '<div class="category-description">', '</div>' ); ?>
    

    in your category.php file. The bottom CSS would go in your Custom CSS box in the theme options page. No promises, but it’s worth a shot 🙂

    #32571

    Thank You Bill but that don’t work and it’s okay for now I can keep the description on each pages =) !!

    I got a question again ^^

    i would like make this presentation for an another website can you help me ? thanks

    #32573

    This is the URL if you want check :

    http://www.evangelisons.fr/category/non-classe/

    #32575

    I Tried to make the same thing on another Website : http://www.evangelisons.fr but no post appear.

    Bises
    Jonathan

    #32576

    After many tries this is where i’m now :

    The code you gave me work well, it’s because i make some wrong change and know i don’t have the description on second page.

    I resolve the Problem about the post of http://www.evangelisons.fr.

    So you can delete the post before because i can’t edit or delete them.

    Now i would like this presentation for Evangelisons.fr i Hope you could help me again.

    #32579
    Bill Robbins
    Moderator

    Hi Jonathan,

    I took a look at http://www.evangelisons.fr/category/non-classe/ but I’m not seeing any posts there. Once you add some, I can take a look. In order to send the changes, I’ll need a page to work with. Just let me know when you’re ready.

    Take care,
    Bill

    #32580

    Hi Bill,

    I desactivated Userpro because i don’t know how allow category to be show or not =) So i’m ready ^^

    #32584
    Bill Robbins
    Moderator

    To line up the posts in your categories like that, add something like this to your Custom CSS:

    
    .category.archive #content article.post {
    	float: left;
    	width: 31%;
    	margin-left: 1%;
    	margin-right: 1%;
    	margin-bottom: 10px;
    }
    

    Hope that helps,
    Bill

    #32586

    That Work perfectly, and do you know where i can change the number of post per category page ?

    Thank you Super Hero !!

    #32587
    Bill Robbins
    Moderator

    Glad that helped out. You can change the default number of posts per page by going to Settings in your WordPress dashboard and clicking on Reading. The posts per page there will change how many are displayed for you.

    Take care,
    Bill

    #32591

    Thank You =)

    #32592
    Bill Robbins
    Moderator

    Happy to help 🙂

Viewing 14 posts - 26 through 39 (of 39 total)
  • The topic ‘Hero section for category’ is closed to new replies.