Add Blog Page's content at top before the post loop

Community Forums Forums General Discussion Add Blog Page's content at top before the post loop

This topic is: not resolved

This topic contains 6 replies, has 4 voices, and was last updated by  dtdolphin 1 year, 3 months ago.

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

    julieg
    Participant
    Post count: 8

    Hello,

    I have a Blog Page and some content in that page, that I’d like to have displayed before the post loop begins.  I can’t seem to figure out how to grab it though, as the_content() grabs the first post in the loop.

    Any help is greatly appreciated!

    Thank you,

    Julie

    http://meor.coderiverlabs.com/blog/
    #36594

    Anita
    Participant
    Post count: 7409

    I don’t understand what you mean. What type of content is it that you are trying to display? You might also ask the theme developer – http://www.coderiverlabs.com.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #36596

    julieg
    Participant
    Post count: 8

    I am the developer. :)

    Within the WP backend in the Blog page, I have content in the page itself (in the WPEditor).  I’d like to display that content at the top before the post loop.

    #36643

    braddalton
    Participant
    Post count: 9212

    Already written about 3 different ways to do this.

    1. You can create a blog page template and add your content using your WordPress editor.

    2. You could also add a widget area in that location

    3. Or you could hook in the content using a custom function

    Examples:

    Or this:

    Code not displaying? Grab it on Guthub

    You can easily change the hook and conditional tag.

    Re: Conditional Tag

    You might need to try using the page i.d of the blog page rather than use [php]is_page_template(‘blog’)[/php]or [php]is_page(‘blog’) [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #40212

    dtdolphin
    Participant
    Post count: 4

    Ok – but where do I put any of this code?

    thanks

    #40213

    braddalton
    Participant
    Post count: 9212

    At the end of the child themes functions.php file.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #40214

    dtdolphin
    Participant
    Post count: 4

    thank you!

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

You must be logged in to reply to this topic.