Hello boss, please How do i put AN IMAGE or “featured image” at the top of the “buddypress activity community update” page
And write something below like: “this is our member of the month”
E.g
“I want to be able to put an image or featured image => https://postimg.cc/3dx5gLvh
.. of my page to show somewhere around here => https://postimg.cc/PCqX5X4m
“AND ALSO SOME WRITE UP BELOW” So it would look something like this=> https://postimg.cc/dDH67nRg
How would i be able to do?
I also found this post= https://buddypress.org/support/topic/featured-image-not-displaying-on-page/
Or maybe something similar like this plugin that adds a content on any post => https://wordpress.org/plugins/add-widget-after-content/
Hello,
Thank you for posting. If you want to show user image before activity directory. You can use the following code.
add_action( 'bp_before_directory_activity', function() { // Replace item id by your user id. I am assuming logged in user id. echo bp_core_fetch_avatar( array( 'item_id' => bp_loggedin_user_id(), 'type' => 'full' ) ); } );
Regards
RaviHi @ravi
add_action( 'bp_before_directory_activity', function() { // Replace item id by your user id. I am assuming logged in user id. echo bp_core_fetch_avatar( array( '114' => bp_loggedin_user_id(), 'type' => 'full' ) ); } );
– the user id is “114” ….trying to add that in functions.php ..but its not working…the editor keeps rolling it back cos of an error
..
And also
How do i put a text underneath the photo like: “employee of the month” ??
- This reply was modified 5 years, 1 month ago by evillizard.
Hello
Try this code
add_action( 'bp_before_directory_activity', function() { // Replace item id by your user id. I am assuming logged in user id. echo bp_core_fetch_avatar( array( 'item_id' => 114, 'type' => 'full' ) ); echo '<p>Employee of the month</p>'; } );
Hello @ravi
,
The code keeps giving this error:
=> https://postimg.cc/8JtzyWM5
Could it be because i am.using a mobile phone???
…
…
I got to do something similar with this plugin => https://buddydev.com/plugins/bp-activity-shortcode/
Look at how i didnt it on a page by jst putting tbe [activity stream] short code under the pic…and it looks good like this => https://postimg.cc/cttGQ8cP
..
But this plugin doesnt show or doesnt have this “WHATS NEW, stuff” => https://postimg.cc/rRxYVGjy
For people to type and say stuff in the community
Your problem is due to incorrect copying.
Please copy it on a desktop and It should work.
For the plugin, Please check the plugin page. You will find the way to enable posting.
Regards
BrajeshHi boss
-alright ild try it as soon as i get on a DESKTOP
…
You also said:
//For the plugin, Please check the plugin page. You will find the way to enable posting.//…
Do You mean this => https://postimg.cc/6yRCLC3Q
…
Yes i have tried putting:
[activity stream allow_posting]
On the page…
But it doesnt give an area for posting (it only shows the activity stream)
*except im putting the shortcode wrongly* , im not really familiar with how to use shortcodes i am sorry…
This was how i put the shortcode:
…
Perhaps i am not doing it the right way??
Its not working still.. But it showed this rectanglar stuff:
https://postimg.cc/S2Fc7MX8…
Also About this code that @ravi shared =
`add_action( ‘bp_before_directory_activity’, function() {
// Replace item id by your user id. I am assuming logged in user id.
echo bp_core_fetch_avatar( array( ‘item_id’ => 114, ‘type’ => ‘full’ ) );
echo ‘<p><a href=”https://banditmouse.com”>Employee of the month</a></p>’;
} );`– is there away i can put or align it (the profile photo) to the center or to the middle …. And also link to THAT PARTICULAR PROFILE
so that when its clicked it goes to the “EMPLOYEE OF THE MONTHS” profile
..
- This reply was modified 5 years, 1 month ago by evillizard.
- This reply was modified 5 years, 1 month ago by evillizard.
- This reply was modified 5 years, 1 month ago by evillizard.
The topic ‘ [Resolved] Add "featured" content at top of "community activity update" page’ is closed to new replies.