Minimum Theme: Adding a Section Title to Blog Post Area on Home Page

Community Forums Forums Design Tips and Tricks Minimum Theme: Adding a Section Title to Blog Post Area on Home Page

This topic is: not resolved

This topic contains 6 replies, has 4 voices, and was last updated by  braddalton 9 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #40231

    kzoll
    Participant
    Post count: 10

    I’m using Minimum to create a new freelance overview website for myself. On the home page, I’ve created blog posts, 1 per job/project I’m working on. What I’d love to do is give that whole blog section a title: “What I Do All Day” or some such heading. I assume it goes into home.php, but I have no idea how to add that.

    Just looking for a centered h2 or h3 title above that whole blog post section.

    Site: http://keikozoll.com

    Advice appreciated!

    http://keikozoll.com
    #40244

    braddalton
    Participant
    Post count: 9730

    You can echo the HTML for your title using a custom function.

    Code not displaying? Grab it on Github.

    Grab the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++.

    You can easily change the hook position and conditional tag to suit your needs.

    You might need to change the conditional tag if you are using a static page as your home page from:
    [php]
    is_home()
    [/php]
    to
    [php]
    is_front_page()
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #69099

    desher
    Participant
    Post count: 2

    This is great – got it where I want it to be. Thank you.
    How do I customize it? Font-size, placement, etc.?

    #69145

    braddalton
    Participant
    Post count: 9730

    Another option is to use the same hook position, and create a widget area instead of simply hooking in your HTML.

    http://wpsites.net/web-design/adding-new-widget-areas-in-studiopress-themes/

    That way you get the styling which already applies to widget areas as its already included in the core Genesis files.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #69482

    desher
    Participant
    Post count: 2

    Great. Thank you, Brad.

    #75271

    jbculp
    Participant
    Post count: 119

    Thanks Brad, worked perfectly for me in Minimum-Pro. Here was my code:

    function add_text_genesis() {
    if(is_home())
    echo '<div class="home-text"><h1 align="center">My Blog Title</h1><br /><br /></div>';
    };
    
    add_action('genesis_before_loop', 'add_text_genesis');
    #75292

    braddalton
    Participant
    Post count: 9730

    Looks good.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.