Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • gurusurfer
    Participant

    @gurusurfer

    Ok for the is_buddypress() the functions

    function for_buddypress() {
        if ( is_buddyPress() ) {
            echo "<meta name=”robots” content=”noindex, nofollow>";
        } else {
        }
    }
    add_action( 'wp_head', 'for_buddypress' );

    Working perfectly, but when creating another function for the bp_is_groups() I am getting error “call to undefined functions bp_is_groups()

    Any help is much appreciated!

    Thanks


    gurusurfer
    Participant

    @gurusurfer

    Never mind, forgot the “;” 🙂


    gurusurfer
    Participant

    @gurusurfer

    I have also tried in a loop like in this codex, but breaking the page, what am i missing?

    <?php if ((is_buddypress() ) { echo '<meta name=”robots” content=”noindex, nofollow>'; } ?>

    You help is much appreciated!

    Thanks


    gurusurfer
    Participant

    @gurusurfer

    Thank you very much for the quick reply!

    Sorry I am no php pro here, tried like this but breaks page!

    add_action( 'wp_head','noindex_groups' );
    function noindex_groups() {
    if ( bp_is_groups() ) {
     echo '<meta name=”robots” content=”noindex, nofollow>'
    }
    }
    add_action( 'wp_head','noindex_buddypress' );
    function noindex_buddypress() {
    if ( bp_is_groups() ) {
     echo '<meta name=”robots” content=”noindex, nofollow>'
    }
    }

    Thanks


    gurusurfer
    Participant

    @gurusurfer

    Just so to be clear since you mentioned the class!

    I am not trying to show the image for paid members visitors here. I want to add an image for the member profile for any user to see when they land on their profile page.

    If you are not familiar with the above tag, do you have a suggestion how I can display an image icon for user profiles of custom role?

    Many thanks


    gurusurfer
    Participant

    @gurusurfer

    Thanks for the amazing support!

    Yes, I am sure it should return true as we have a lot of paid memberships!

    And I think i am using is properly, here is the codex on it http://cbcd.org/wp-content/plugins/membership/docs/namespaces/default.html


    gurusurfer
    Participant

    @gurusurfer

    Hi,

    Sorry, here is the code again!

    <?php if ( ms_has_membership() ) : ?>
    <img src="http://my-site.com/wp-content/uploads/2015/11/img.png" alt="" height="25" width="25" /></img>
    <?php endif; ?>

    Also tried:

    <?php 
    if ( ms_has_membership() ) {
    echo '<img src="http://my-site.com/wp-content/uploads/2015/11/img.png" alt="" height="25" width="25" />';
    } else {
    echo '<img src="http://my-site.com/wp-content/uploads/2015/11/img2.png" alt="" height="25" width="25" />';
    }
    ?>

    Only the image in false is being returned for all users including paid members.

    Any advice is much appreciated.

    Thanks


    gurusurfer
    Participant

    @gurusurfer

    Thank you very much. I could not tell it had to go in the notifications loop 🙂


    gurusurfer
    Participant

    @gurusurfer

    Any help with ths simple request is much appreciated!

Viewing 9 replies - 1 through 9 (of 9 total)
Skip to toolbar