remove welcome message on all pages

Hello there,

I am using BP corporate theme and they have this neat feature to display welcome messages on the theme with a “sign up” icon with it.

The thing is that I only want to display this on the from page only. Any suggestions on editing this to only show on home page? I created a child theme that I use so I am willing to add the specific fields to the theme and edit it accordingly

  • DavidM
    • DEV MAN’s Mascot

    Hi infotechd,

    Where in the theme are you trying to include that content? Would it be in the general content area, perhaps a widget?

    There are likely simpler ways without having to go the template files, as that gets fairly specific and isn’t something we generally can accommodate via support requests, depending on the nature of the matter.

    Could you let us know what generally you’re trying to include and where?

    Thanks,

    David

  • DavidM
    • DEV MAN’s Mascot

    Thanks Jason,

    That makes perfect sense, I just seem to have misunderstood your original post! To get that section displayed only on your homepage, you’ll have to edit the following file:

    bp-corporatelibtemplateswp-templatecall-signup.php

    You can insert on line 8 the following:

    <?php if( is_home() ) { ?>

    And on line 47, right before the final <div> you can add this:

    <?php } ?>

    That should do it!

    Cheers,

    David

  • Jason
    • The Bug Hunter

    Thanks alot, David. You are awesome…

    Question, if i have a child theme created and after I edit the file, do I move it to the child theme? Do I need to copy the entire “lib” folder? Or Do i just need to maintain the tree structure and move the “lib” folder but only that file.

    I am just trying to ensure if the theme updates, I do not loose any future changes…

    Thank you

  • Saunt Valerian
    • The Bug Hunter

    hmm, I was looking to do the same thing. I added the code to the file in the child theme (tree structure intact) but the snippets made the welcome message disappear on everything. It didn’t display on the home page.

    infotechd, did you get this to work for you?

  • Jason
    • The Bug Hunter

    Oh I missed this.

    It worked like a charm. Did exactly as indicated. Well in fact, I took it a step further and used the if user is logged in option instead of the if home option. I think that is better.

    <?php
    include( TEMPLATEPATH . '/options-var.php' );
    $tn_buddycorp_call_signup_text = get_option('tn_buddycorp_call_signup_text');
    $tn_buddycorp_call_signup_button_link = get_option('tn_buddycorp_call_signup_button_link');
    $tn_buddycorp_call_signup_button_text = get_option('tn_buddycorp_call_signup_button_text');
    ?>

    <?php if ( !is_user_logged_in() ) { ?>
    <div id="call-action">
    <p>

    <?php
    if($tn_buddycorp_call_signup_text == ''){ ?>
    <?php _e("Welcome to your BuddyPress Corporate theme!",TEMPLATE_DOMAIN); ?><br />
    <span><?php _e("Change or remove the text here using the",TEMPLATE_DOMAIN); ?> <a href="<?php echo site_url(); ?>/wp-admin/themes.php?page=options-functions.php"><?php _e('theme options', TEMPLATE_DOMAIN); ?></a></span>
    <?php } else { ?>

    <?php
    if( function_exists('do_shortcode') ) {
    echo stripslashes( do_shortcode($tn_buddycorp_call_signup_text) );
    } else {
    echo stripslashes($tn_buddycorp_call_signup_text);
    }
    ?>
    <?php } ?>
    </p>

    <?php if ( !is_user_logged_in() ) { ?>
    <div class="bpc-button">

    <?php if($tn_buddycorp_call_signup_button_link != '') { ?>
    <a href="<?php echo stripslashes($tn_buddycorp_call_signup_button_link); ?>">
    <?php } else { ?>
    <?php if($bp_existed == 'true') { ?> <a href="<?php echo bp_root_domain() . '/' . BP_REGISTER_SLUG . '/'; ?>">
    <?php } else { ?><a href="<?php echo site_url(); ?>/wp-login.php?action=register"><?php } ?>
    <?php } ?>

    <?php
    if($tn_buddycorp_call_signup_button_text == ''){ ?>
    <?php _e('Join Us Here', TEMPLATE_DOMAIN); ?>
    <?php } else { ?>
    <?php echo stripslashes($tn_buddycorp_call_signup_button_text); ?>
    <h1>Why wait?</h1><p><img src="http://huceacs.com/images/icons/click_here.png"/></p>
    <?php } ?>
    </a>
    </div>
    <?php } ?>
    </div>
    <?php } ?>

    I added a few words in about line 44 which can be removed.

    I did copy the file and maintain the structure. I deleted all the other files. I place this in my child theme.

    It worked for me but I am not sure if you were able to figure it out. Let me know if I can help but I know David is great.

    Jason

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.