simple hooks plugin – display on home page only?

Community Forums Forums Design Tips and Tricks simple hooks plugin – display on home page only?

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  tanyaslogos 6 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #90217

    tanyaslogos
    Participant
    Post count: 12

    I am using freelance – I want a paragraph of text to display only on the home page.

    I can’t seem to get it to work no matter what I do it shows on none or all.

    this is what I have put into the “genesis before loop” box

    <?php is_front_page(); ?>
    <div style="font-size: 18px;">
    <strong style="font-size:20px; font-family: arial;">Welcome to Guatemalan Nativities! </strong>
    <br /><br />
    We offer a variety of custom crafted Nativity Scenes and Ornaments from Guatemala, El Salvador, Mexico, Peru and more! Each of our beautiful products are totally unique as they are hand made by some truly talented artists. These would make lovely gifts to give at Christmas time or to keep and pass down to generations to come.</div><br />

    I have php enabled.

    I have tried is_home, I have tried it with a colon, with a semi-colon, with the closing php at the end and without. I am at my wits end on why this isn’t working.

    Anyone got any ideas? Thanks in advance for any insight at to what I am doing wrong.

    Sincerely,
    Tanya

    https://guatemalannativities.com
    #90303

    braddalton
    Participant
    Post count: 9192

    Easier to add a new widget http://wpsites.net/web-design/adding-new-widget-areas-in-studiopress-themes/


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #90329

    tanyaslogos
    Participant
    Post count: 12

    Thank you so very much Brad! I tried going that route but failed miserably. I just tried again using your code and still failed. lol

    So I must be doing something wrong.

    At first I thought the problem was with FREELANCE because it is set up to display widgets depending on your page/post selection in the READING settings on WP but I can’t get it to display the widget on ANY page :(

    Here is the code I have used. It gives me the welcome text box in the widgets area but nothing I put in the box is displaying.

    // CODE FOR ADDING NEW WIDGET
    genesis_register_sidebar( array(
    	'id'          => 'weclome-text',
    	'name'        => __( 'Welcome Text', 'domain' ),
    	'description' => __( 'Add Welcome Text Here', 'domain' ),
    ) );
    
    add_action( 'genesis_before_loop', 'your_widget' );
    
    function your_widget() {
    
    if ( is_page('about') && is_active_sidebar('welcome-text') ) {
    
    genesis_widget_area( 'welcome-text', array(
    
    'before' => '<div class="welcome-text widget-area">',
    
    'after'	 => '</div>',
    		
    ) ); 
    
      }
    
    }

    I have tried displaying it on the about me page just to make sure it isn’t the “home” page that is an issue since I am using a shopp page for the home page. But no matter what I do – it doesn’t work.

    I wasn’t sure what the ‘domain’ meant so I left it as it was – I also wasn’t sure about the ‘your_widget’ either so I left it be. Do I need to change either of those?

    Any and all help would be SOOOOOO appreciated!

    #90337

    braddalton
    Participant
    Post count: 9192

    weclome


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #90355

    tanyaslogos
    Participant
    Post count: 12

    awe heck. I was hoping you would know why it wasn’t working lol

    There is really no rhyme or reason as to why it doesn’t work except for maybe it’s because the wordpress gods hate me.

    oh well – back to the drawing board. – Thanks again!

    #90364

    braddalton
    Participant
    Post count: 9192

    Did you try changing this?
    [php]
    ‘id’ => ‘weclome-text’,
    [/php]

    to this:

    [php]
    ‘id’ => ‘welcome-text’,
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #90369

    tanyaslogos
    Participant
    Post count: 12

    I think my eyes must be dying because the before and after you posted look identical to me. lol

    #90371

    tanyaslogos
    Participant
    Post count: 12

    GEEZE! i am sorry – i just spotted it. lol will try that

    #90375

    tanyaslogos
    Participant
    Post count: 12

    That was it – thank you again for your help. I think now I need to make an appointment with my optometrist!

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

You must be logged in to reply to this topic.