BuddyDev

Search

[Resolved] BuddyPress Simple Front End Post change icon and add a custom text

  • Participant
    Level: Initiated
    Posts: 10
    Dime on #14642

    I’m using BuddyBlog and Paid Memberships Pro plugin for membership.

    —-first question—-
    I want to ask you how I can change the icon of the blog that appears in account home page.

    https://i.imgur.com/hutUulF.jpg

    —-second question—-
    I also want to ask you how can I write a message to users who do not have the privilege to post

    Ex.
    https://i.imgur.com/GhN9TRo.jpg

    Thank you

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #14649

    HI Dime,

    1. For Icon, Please contact your theme authors. Icons are provided/set by the theme authors and they will assist you.

    2. Please copy plugins/buddyblog/template/buddyblog/edit.php to yourtheme/buddyblog/edit.php and add this line

    
    
    <?php if( ! current_user_can( buddyblog_get_option( 'post_cap' ) ) :?>
    message... here..
    
    <?php endif;?>
    
    

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 10
    Dime on #14665

    This does not work, I now have trouble setting up a new post

    This is my code located in edit.php

    ************************

    <?php if ( function_exists( ‘bp_get_simple_blog_post_form’ ) ): ?>
    <?php
    $form = bp_get_simple_blog_post_form( ‘buddyblog-user-posts’ );

    $form->show();
    ?>

    <?php else: ?>
    <?php _e( ‘Please Install BP Simple Front End Post Plugin to make the editing functionality work.’, ‘buddyblog’ );?>
    <?php endif; ?>

    <?php if( ! current_user_can( buddyblog_get_option( ‘post_cap’ ) ) :?>
    Test Message
    <?php endif;?>

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #14667

    What trouble do you have in setting up a new post? I don’t see any issue caused by this unless you are using some other snippet to modify the behaviour too.

  • Participant
    Level: Initiated
    Posts: 10
    Dime on #14668

    I don’t use anything else.

    https://i.imgur.com/cssOiiE.jpg

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #14671

    Ahh,
    Sorry about that. I see it is a php error.

    It was an error on my part, there will be an extra ‘)’ in the code.

    
    <?php if( ! current_user_can( buddyblog_get_option( 'post_cap' ) ) ) :?>
        message... here..
    
    <?php endif;?>
    

    Please use this instead.

  • Participant
    Level: Initiated
    Posts: 10
    Dime on #14672

    Now work fine.

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #14673

    Thank you for confirming. I am glad it worked.

    Marking as resolved.

You must be logged in to reply to this topic.

This topic is: resolved