Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] whats-new text area on homepage

  • @totoff

    Participant

    Hi,

    i am using buddypress for my website, and my homepage is a static page, but i’d like to be able to use ‘whats-new text area’ on my homepage so as people can post news from the homepage.
    do you have any idea how to do that?

    i have done this but it does not work:

    <div id=”whats-new-content”>
    <div id=”whats-new-textarea”>
    <textarea name=”whats-new” id=”whats-new” cols=”50″ rows=”10″ style=”height: 50px;”></textarea>
    </div>

    <div id=”whats-new-options” style=”height: 40px;”>
    <div id=”whats-new-submit”>
    <input type=”submit” name=”aw-whats-new-submit” id=”aw-whats-new-submit” value=”Post Update”>
    </div>

    <div id=”whats-new-post-in-box”>

    Post in:

    <select id=”whats-new-post-in” name=”whats-new-post-in”>
    <option selected=”selected” value=”0″>My Profile</option>

    </select>
    </div>
    <input type=”hidden” id=”whats-new-post-object” name=”whats-new-post-object” value=”groups”>

    </div><!– #whats-new-options –>
    </div>

    thanks in advance,

Viewing 6 replies - 1 through 6 (of 6 total)
  • @danbp

    Participant

    Hi @totoff,

    What’s new is a form (see activity/post-form.php)
    To get it on a custom page, you can call it like it’s done in activity/index.php

    if ( is_user_logged_in() ) :
    		 bp_get_template_part( 'activity/post-form' ); 
     endif;

    That said, this form is not exactly a post editor, but more a brief notice or message publication to members, and depends of the context (activities or groups for ex.)

    To let users publish blog poss from the front-end, you have to search for a specific plugin probably.

    @totoff

    Participant

    thanks a lot for your reply,
    i am not a developer, will be something like this 😕
    <HTML>
    <p>
    <?php
    if ( is_user_logged_in() ) :
    bp_get_template_part( ‘activity/post-form’ );
    endif;
    ?>
    </p>
    </HTML>
    i have tried to add it, but it dos not work.
    thanks,

    @danbp

    Participant

    ok, i haven’t tested. sorry ! Try this instead.

    if ( is_user_logged_in() ) :
        locate_template( array( 'activity/post-form.php'), true );
     endif;

    @totoff

    Participant

    thanks
    it does not work neither. that’s weird.
    i am using allow php (php snippet) in post then i use shortcode on my webpage. i have tried with another php snippet and it works fine so problem must be from the php code then 🙁

    @danbp

    Participant

    Test this one. It works for me on a static homepage with custom template.

    
    <?php if ( is_user_logged_in() ) :			
    	bp_get_template_part( 'activity/post-form' );			
    endif; ?>

    @totoff

    Participant

    thanks a lot it works well on my website 😉

    cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] whats-new text area on homepage’ is closed to new replies.
Skip to toolbar