Blog post date

Homepage Forums Pro Support Forum BoldR Pro BoldR Pro Support Blog post date

Note about WordPress 5.0:
Our themes are compatible with WordPress 5.0. However not all functionality are guaranteed to work as expected with the new editor (Gutenberg) that comes with 5.0.

We highly recommend installing the Classic Editor plugin, which will bring back the usual editor if you run into any issue or just do not like the new editor.

An update to bring full compatibility with Gutenberg is being worked on, but has been postponed because of the recent fast-paced evolution of the Gutenberg project until WP 5.0 release. More info about the release of WordPress 5.0 announced on a short 2-days notice can be found here: New 5.0 Target Date.

Blog post date

This topic contains 2 replies, has 2 voices, and was last updated by  Adam 3 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24584
    Blog post date

    Adam
    Participant

    Hi,

    Is there a way to move the blog post date and name to under the title of the page? Preferably under the category? I would also like to completely delete the comment information. I just want it in text, and not in a widget under the title.

    Many thanks in advance.
    Adam

    #24586
    Reply to: Blog post date

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    Hi, this is possible but will require a little bit of work, since you are basically changing one of the base elements of this theme’s design.

    You’ll need to create a child theme, and customise the template for the blog posts (single.php), as well as for the main blog page and categories pages where lists of blog posts are shown (index.php)

    There will be a couple of lines in both of these files to move around to effectively “move” the date and author, and then a bit of custom CSS to adjust the styling.

    Step 1: Create a child theme (see https://developer.wordpress.org/themes/advanced-topics/child-themes/ – note that step #3 from this doc is not necessary with this theme)

    Step 2: copy single.php and index.php from boldr-pro and into your child theme.

    Step 3: Edit single.php in your child theme, and move (cut) this block (lines 38 to 64)

    ?><div class="postmetadata"><?php
    [...]
    ?></div><?php // End postmetadata

    and paste it between this two lines (just a few lines below):

    ?><h1 class="entry-title"><?php the_title(); ?></h1><div class="post-category"><?php _e('Posted in', 'icefit'); ?> <?php the_category(', '); ?></div><?php
    [paste here]
    the_content();

    Step 4: Similarily, in index.php, move (cut) this block (lines 81 to 109):

    ?><div class="postmetadata"><?php
    [...]
    ?></div><?php // End postmetadata

    to between these lines a few lines below:

    		<?php endif;
    [paste here]
    		?><div class="post-content">

    Step 5: Now the code is in the right place, you need to custom CSS to adjust the styling. Add this to Appearance > Theme Options > Code & CSS > Custom CSS:

    .post-contents {
        padding-left: 0;
    }
    
    .post-category {
        margin: 0;
    }
    
    .postmetadata {
        float: none;
        width: initial;
        margin: 0;
    }
    
    .postmetadata span {
        text-align: left;
        padding: 0;
        line-height: initial;
        margin: 0;
        font-size: 12px;
    }
    
    .meta-date {
        background: none;
        width: initial;
    }
    
    .meta-date a, .meta-date a:visited {
        color: #707070;
    }
    
    .meta-date span {
        display: inline;
        line-height: initial;
        font-size: 13px !important;
        text-transform: none;
        margin: 0 0.25em 0 0;
    }
    
    .postmetadata .meta-comments {
        display: none;
    }
    
    .postmetadata .meta-author span {
        display: inline;
    }
    
    .postmetadata .meta-author {
        background: none;
        font-size: 12px;
        margin: 1em 0 0.5em 0;
        color: #707070;
    }
    #24587
    Reply to: Blog post date

    Adam
    Participant

    Thank you for this information, I really appreciate it.

    I will save this and have a go when I’m a bit more experienced.

    Thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.


PayPal Verified
Secured by PayPal
Secure Credit Card payments powered by Stripe