Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1319474
    Suzanne S
    Participant

    Hi,
    Is there a way to show the category and post date on Single Blog Posts, possibly in the style of the ‘tags’?

    thank you

    Suzanne

    #1319884
    Christopher
    Moderator

    Hi there,

    Please enable ‘post meta’ under Customize -> Blog.

    Hope it helps.

    #1322001
    Suzanne S
    Participant

    Thanks but that wasn’t what I asked. I would like to show the category on the single blog posts in the style of how ‘tags’ are displayed?

    #1322005
    Christopher
    Moderator

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1323569
    Suzanne S
    Participant
    #1323749
    Paul R
    Moderator

    Hi,

    To achieve that, create file _content-post-footer.php in wp-content/themes/x-child/framework/views/renew
    and copy the code below into that file.

    
    <?php
    
    // =============================================================================
    // VIEWS/RENEW/_CONTENT-POST-FOOTER.PHP
    // -----------------------------------------------------------------------------
    // Standard <footer> output for various posts.
    // =============================================================================
    
    ?>
    
    <?php if ( has_tag() ) : ?>
      <footer class="entry-footer cf">
        <?php echo get_the_tag_list( '<p><i class="x-icon-tags" data-x-icon=""></i>'. __( 'Tags:', '__x__'), ', ', '</p>' ); ?>
      </footer>
    <?php endif; ?>
    <?php
     $categories        = get_the_category();
          $separator         = ', ';
          $categories_output = '';
          if(is_array($categories)) {
          foreach ( $categories as $category ) {
            $categories_output .= '<a href="'
                                . get_category_link( $category->term_id )
                                . '" title="'
                                . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                                . '"> '
                                . $category->name
                                . '</a>'
                                . $separator;
          }
    }
          $categories_list = sprintf( '<span>%s</span>',
            trim( $categories_output, $separator )
          );
          ?>
          
          <?php if ( $categories_list !="" ) : ?>
           <footer class="entry-footer cf">
        <?php echo '<i class="x-icon-bookmark" data-x-icon=""></i> Categories: '.$categories_list; ?>
      </footer>
      <?php endif; ?>
    

    Hope that helps

    #1324672
    Suzanne S
    Participant

    Brilliant, thank you!

    I have another question.

    My blog style has the space removed from the top of the 2nd post downwards. Also I have the button styled.
    When I go to a category or a tag page the style is not there.

    This is the code for the button which works great:

    .blog .more-link {
    margin-top: 10px;
    border-width: 2px;
    border-color: rgb(181, 186, 192);
    float:right;
    }

    I am unsure exactly which part of my custom css code applies to the space between blog posts.

    Sorry to be such a pain.

    I really do appreciate all your help and really love x theme.

    regards
    Suzanne

    #1325101
    Christopher
    Moderator

    Hi there,

    In regards with spacing issue, are you referring to categories pages?
    If so, please remove padding properties from following code :

    .x-main .hentry {
        border-bottom: 2px solid rgb(181, 186, 192);
        padding-bottom: 30px;
        padding-top: 40px;
    }

    Update your code to :

    a.more-link {
        margin-top: 10px;
        border-width: 2px;
        border-color: rgb(181, 186, 192);
        float: right;
    }

    Hope it helps.

    #1325721
    Suzanne S
    Participant

    The button code works perfect thank you.

    .x-main .hentry {
    border-bottom: 2px solid rgb(181, 186, 192);
    padding-bottom: 30px;
    padding-top: 40px;
    }

    This code changes the spacing for the first post on the main blog roll.

    https://howtostartworkingathome.com/articles/

    If you look at this page the spacing for the 2nd plus posts, the space at the top is too big?

    https://howtostartworkingathome.com/category/affiliate-marketing/

    #1325894
    Darshana
    Moderator

    Hi there,

    Please update your above code as follows.

    
    .x-main .hentry:first-child {
        border-bottom: 2px solid #b5bac0;
        padding-bottom: 30px;
        padding-top: 40px;
    }
    

    Hope that helps.

    #1326248
    Suzanne S
    Participant

    Sorry that doesn’t work.

    #1326731
    Paul R
    Moderator

    Hi,

    You can try this code instead.

    
    .archive.category .x-main .hentry {
       margin-top:0;
    }
    

    Hope that helps.

    #1326891
    Suzanne S
    Participant

    Excellent…thank you so much 🙂

    Have a great day.

    regards
    Suzanne

    PS. X theme Support Rocks!

    #1326912
    Rue Nel
    Moderator

    You’re welcome!
    Thanks for letting us know that it has worked for you.

  • <script> jQuery(function($){ $("#no-reply-1319474 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>