• Resolved Gabbz

    (@gabbz)


    Hi,
    first I just have to thank you for an awesome theme. Really nice to work with.

    Now I’m a little newbie here, and could use some help or just a nudge in the right direction. I want to move the time and author to above the post, just below the header line. Instead of having it together with the category and tags.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author DevDm

    (@devdm)

    Glad you like the theme Gabbz! What you are trying to do can be accomplished with a couple little adjustments to your child theme.

    The first thing you will want to do is duplicate the template-part-postmeta.php file and put a copy of it in your child theme. This contains the current code for the post time and author. You’ll want to remove it from the file so it doesn’t show twice. This will give you some code to copy and paste into the next file you are going to duplicate.

    That file is the main index.php file. This contains the main loop that is running through your posts and where you will put in the code you just cut out!

    You will see two <h2 class=”page-header”> lines in this index.php file. This is where the title code starts for a single post (the top loop) and multiple posts (the bottom loop). So around this area you will put in your code you cut out from the template-part-postmeta.php and make any adjustments.. yadda yadda!

    Hope this helps!

    Thread Starter Gabbz

    (@gabbz)

    Thanks, that worked like a charm 🙂

    Another question, how do I enable the boostrap navbar-static-top?
    Is it possible?

    Theme Author DevDm

    (@devdm)

    Sure is!

    You will duplicate the template-part-topnav.php

    Find this line:

    <nav class=”navbar navbar-inverse” role=”navigation”>

    and just add the class “navbar-fixed-top”

    So it turns into:

    <nav class=”navbar navbar-inverse navbar-fixed-top” role=”navigation”>

    Now, when you are logged in the admin bar hovers over it so you will need to put in some logic there to add some margin/padding to the nav and the body if it bothers you. There are a few ways to do that.

    You can use the function below to test and sort it out.

    http://codex.wordpress.org/Function_Reference/is_admin_bar_showing

    Thread Starter Gabbz

    (@gabbz)

    Yea I got the fixed to top working, but I rather have it scroll with the content therefore I need the static one 🙂

    Theme Author DevDm

    (@devdm)

    Oh in that case it is easier.

    Add the “navbar-static-top” to the <nav > element.

    Open that index.php file and switch the position of these two:

    <?php get_template_part(‘template-part’, ‘head’); ?>

    <?php get_template_part(‘template-part’, ‘topnav’); ?>

    So the topnav will be first.

    <?php get_template_part(‘template-part’, ‘topnav’); ?>

    <?php get_template_part(‘template-part’, ‘head’); ?>

    You’ll need to do this for page.php too!

    Thread Starter Gabbz

    (@gabbz)

    Thanks for your help 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to move time and author from post meta’ is closed to new replies.