How do I add a standard paragraph near the top of several hundred of my pages

Community Forums Forums Design Tips and Tricks How do I add a standard paragraph near the top of several hundred of my pages

This topic is: not resolved

Tagged: ,

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

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

    hdeutch
    Participant
    Post count: 11

    I want to add a standard paragraph near the top of several hundred of my pages. I suppose widgets is the way to go but I’m not clear on how to do it.

    I would appreciate your guidance.

    Thanks.

    #38938

    braddalton
    Participant
    Post count: 10350

    There’s several ways to do this:

    1. Add a custom widget area
    2. Use a custom function and echo the paragraph of text
    3. Paste the text within p tags in the Genesis Simple Hooks plugin with a conditional tag

    I gather you don’t want the text to display site wide.

    2 questions:

    1. You want to display your text only before pages or posts or both?
    2. Which hook position do you want to use?


    #38976

    hdeutch
    Participant
    Post count: 11

    Thank you for your response.

    1.  I want to display my text only at the top of certain pages.

    2.  As to “hook position” I can’t give you an answer because I don’t know anything about that.

    I have installed the Genesis Simple Hooks plugin but I don’t know what to do next.

    I recently switched from another theme to Genesis. I understand that Genesis has a great many capabilities.  For me, I need some guidance to do what I thought would be fairly uncomplicated.

    I suppose your advice is uncomplicated for a programmer.  But can you give some guidance to me, a non-programmer?

    Howard

    #39040

    braddalton
    Participant
    Post count: 10350

    @hdeutch You’ll need to work out exactly which position you want to display your text using the hook map.

    You can output your paragraph of text in any hook location Genesis provides.

    You can also add a conditional tag to the code so the text is only displayed in that hook location for posts filed in specific categories or pages with specific i.d’s:

    Example: This code will display text before posts in specific categories

    Example: This code will display text before specific pages.

    Copy the code using 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 change:

    1. The genesis_hook http://genesistutorials.com/visual-hook-guide/
    2. The conditional tag http://codex.wordpress.org/Conditional_Tags
    3. The categorie i.d’s http://www.wprecipes.com/how-to-find-wordpress-category-id
    4. The text or HTML between the div tags.

    I suggest if you’re wanting to do PHP programming, that you install WordPress locally using instantwp.com for Windows or MAMP for Mac and play around with it there so you learn from any error messages and it doesn’t effect your live site.


    #39079

    braddalton
    Participant
    Post count: 10350

    You can also add a comma separated list of page i.d’s to the above code in an array.

    Paste this code in your child themes functions.php file and add the i.d’s or page names to the array.

    Code not displaying? Grab it on Github.


    #39145

    hdeutch
    Participant
    Post count: 11

    Thanks very much for your help.

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

You must be logged in to reply to this topic.