Need static text on blog page

Community Forums Forums Design Tips and Tricks Need static text on blog page

This topic is: resolved

Tagged: , ,

This topic contains 5 replies, has 2 voices, and was last updated by  78inch 1 year, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29378

    78inch
    Participant
    Post count: 4

    Hi everyone,

     

    I’m creating a site using Apparition. I created a Blog page and I’d like a few static lines of introduction just before the post snippets. A sticky post doesn’t really cut it.

    Apparition does not seem to have any such widget area as standard so I tried Genesis Simple Sidebars and created a widget area, but it doesn’t show up. (Overruled by the theme?)

    I also checked this method http://designsbynickthegeek.com/tutorials/add-widgeted-sidebar but that seems to work throughout the whole site and not just the blog page.

    Can anyone help me out? Many thanks in advance.

    Jelle

    http://www.supercontent.be

    #29380

    braddalton
    Participant
    Post count: 9194

    Paste this code at the end of your child themes functions.php file.

    Change the hook to another location if needed.

    Use the new class
    .text-before-blog {}
    for styling.

    Another way to add text quickly is to install the Genesis Simple Hooks plugin and paste the code which includes a conditional tag for the page i.d into the hook location you want the text to output.
    [php]
    <?php if (is_page(’007′) ) { ?>
    <p>Text-Goes-Here</p>
    <?php } ?>
    [/php]

    Add the i.d for your blogs archive page.

    Or use the blog page template conditional:

    [php]
    <?php if (is_page_template (‘blog.php’) ) { ?>
    <p>Text-Goes-Here</p>
    <?php } ?>
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #29383

    78inch
    Participant
    Post count: 4

    Tried the last solution and it worked great. Many thanks!

    #29385

    78inch
    Participant
    Post count: 4

    Sorry, too soon. The text I inserted appears on top of the blog now, but also on the other pages. The

    <?php if (is_page_template ('blog.php') ) { ?>

    part doesn’t seem to work?

    #29391

    braddalton
    Participant
    Post count: 9194

    Try the code in the gist replacing the post i.d.

    You will need to find the post i.d for your blog page archive and replace it where the 139 is.

    The code snippets are samples and need to be modified with your specific blog page i.d.

    https://gist.github.com/braddalton/5195501


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #29627

    78inch
    Participant
    Post count: 4

    And it works – awesome! Thanks for your help, Brad!!

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

You must be logged in to reply to this topic.