• Im trying to get a custom widget to show up on a particular page, but the site breaks after updating the func.php I know it has to do with the conditional tag value because if I remove the tag and update, site is fine, but of-course, widget shows up on all pages. Tried a few other things and always the same white screen…..
    Below is the entry (PLEASE HELP)

    //* Socialize Widget Area
    genesis_register_sidebar( array(
    ‘id’ => ‘socialize-widget’,
    ‘name’ => __( ‘Socialize’, ‘magazine’ ),
    ‘description’ => __( ‘Below header of the socialize page.’, ‘magazine’ ),
    ) );

    add_action( ‘genesis_after_header’, ‘socialize_widget’ );
    function socialize_widget() {
    if ( is_page( ‘Socialize’ ));
    genesis_widget_area( ‘socialize-widget’, array(
    ‘before’ => ‘<div class=”socialize-widget widget-area”>’,
    ‘after’ => ‘</div>’,
    ) );

    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • This is a forum for technical subjects and I’m afraid just saying

    ...but the site breaks after updating the func.php...

    tells us nothing about what you are seeing when the site “breaks”

    Are you getting an error message – could you share it with us, please?

    Where did the func.php file come from or do you mean functions.php – as in the functions.php file in the theme directory?

    What page are you talking about – a post list page, a post page, a page page, a search result page, a category post list page????

    Please provide as much information as you can – we are not, or at least I am not, physic and can’t read your mind to find out what you are seeing and what you know about the changes you’ve made and where you made them.

    Hint – code is easer to read if you mark it as code.

    When you paste in some code, highlight all of it and then click the code button right above the textarea where you are typing your question or reply.

    That will format it so it is easier to read.

    Bob

    Thread Starter vgar1979

    (@vgar1979)

    My apologies…
    I am using Genesis Framewsork and Magazine Pro Child theme.
    This line of code is intended for a PAGE page and inserted into the functions.php inside the child theme. What I am trying to do originally is have the Widget show up on just ONE specific PAGE page, but seems to show up on all page/post through out the site. Below is the code being used. Thanks in advance.

    //* Socialize Widget Area
    genesis_register_sidebar( array(
    	'id'          => 'socialize-widget',
    	'name'        => __( 'Socialize', 'magazine' ),
    	'description' => __( 'Below header of the socialize page.', 'magazine' ),
    ) );
    
    add_action( 'genesis_after_header', 'socialize_widget' );
    function socialize_widget() {
    				if ( is_page( 'Socialize' ));
                    genesis_widget_area( 'socialize-widget', array(
    		'before' => '<div class="socialize-widget widget-area">',
    		'after'  => '</div>',
        ) );
    
    }

    So the “break” is that the material shows up on all page instead of just one specific page – correct.

    What specific page is is supposed to show on ?

    I don’t have a copy of the functions.php file from the theme you are modifying and without it I can’t tell where the code should be put.

    Also, Magazine Pro theme is a commercial theme and support for commercial themes is not supplied on these forums. Only free themes are supported here.

    You must go to the seller’s support site or forum for assistance with their products. https://my.studiopress.com/themes/magazine/

    Bob

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Site breaks after: if ( is_page( is enetered’ is closed to new replies.