Static text on top of blog page?

Community Forums Forums Design Tips and Tricks Static text on top of blog page?

This topic is: not resolved

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  dev 11 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #71401

    dev
    Participant
    Post count: 457

    I’m using the OLD Agency theme.

    At the top of my blog page I want to put a few paragraphs of static info… you know like… “Welcome to the blog page. We hope you will enter stuff, but please be friendly” yada, yada.

    If you put it in the content box via the editor on the blog page, nothing shows up.

    Is there a way to get some static text at the top of the blog page? Or do I have to use code?

    Thanks.

    #71406

    Sridhar Katakam
    Participant
    Post count: 1049
    #71476

    dev
    Participant
    Post count: 457

    Using Agency 2.0…. not the new “pro” that came out a few weeks ago.

    I Googled all over and found some code from own own and very valued Gen guru, Brad Dalton https://gist.github.com/braddalton?direction=asc&page=8&sort=created that works… but thought there would be an easier way.

    [php]
    genesis_register_sidebar( array(
    ‘id’ => ‘text-before-blog’,
    ‘name’ => ‘Text Before Blog’,
    ‘description’ => ‘This is the widget for displaying text before blog posts.’,
    ) );

    add_action(‘genesis_before_content’, ‘apparition_text_before_blog’ );
    function apparition_text_before_blog() {

    if( is_page(333) ) {
    echo ‘<div class="text-before-blog">’;
    dynamic_sidebar( ‘text-before-blog’ );
    echo ‘</div>’;
    }
    }

    [/php]

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

You must be logged in to reply to this topic.