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 6 replies, has 3 voices, and was last updated by  nate 1 year ago.

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


    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 but that seems to work throughout the whole site and not just the blog page.

    Can anyone help me out? Many thanks in advance.




    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 if (is_page(‘007′) ) { ?>
    <?php } ?>

    Add the i.d for your blogs archive page.

    Or use the blog page template conditional:

    <?php if (is_page_template (‘blog.php’) ) { ?>
    <?php } ?>



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



    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?



    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.



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




    Thanks for this post. I feel like I am getting close with this but not quite there.

    I have the Eleven40 child theme.

    I added the code to the functions.php in the editor. This gave me the “text before blog” widget area where I added in what I wanted.

    Just to clarify I want this to work on my home page so that I can display the “blogroll” with static stuff above it.

    I can get this to work on my other pages – e.g. right now I have the PHP pointing towards my about page and that is working how I would like it to – – This was done by pasting the code and setting the “if( is_page(139) )” to the number of the about page. But what is the number of the Front Page when the front page is set to “Your Latest Posts” in Settings>reading?

    Put another way I can’t figure out how to point this to the blogroll – i.e. if I go to Settings>>Reading and set to “Your Latest Posts” How do I point the new php in the functions.php so that the content in the “text before blog” widget area will show up on the home page.

    I hope I have explained what I mean here correctly.

    Any help with this would be very much appreciated.

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

You must be logged in to reply to this topic.