‘Recent Posts’ widget modification
-
Hi guys,
I understand that buddypress has a recent post widget that shows the title of recent posts by the sidebar.
Could it be modified to incorporate an excerpt for each of these posts?
I understand theres already such a widget for forum posts by Nicola here: http://buddypressdev.org/plugins/bpdev-forums-excerpt
But there are none for recent blog posts!
-
Comment out line 47 in bp-blogs-widgets:
<?php $counter++; ?>
That will get you excerpts for all posts.
Hey, thanks for the reply.
But any idea where is this bp-blogs-widget file located?
Thanks!
If you had spent a minute looking, you’d have found it yourself. It’s in the /mu-plugins/bp-blogs/ folder.
Sorry, I posted the above post because I couldn’t find it.
And the bp-blogs-widget file is not located in my /mu-plugins/bp-blogs
Any idea why it isn’t present?
it’s in the /mu-plugins/bp-core/
<?php $counter++; ?> is on the line 133 (using buddypress rc1)
/wp-content/mu-plugins/bp-core?
I can’t find it, only have a bunch of bp-core files like bp-core-activation.php
sorry for the trouble, and thanks for the help rendered.
The recent blog posts widget lives here:
/wp-content/mu-plugins/bp-blogs/bp-blogs-widgets.php
Is there any way to get the WordPress Plugin “advanced axcerpt” to work here?
its also possible to change the statement above instead of removing $counter ++;
this way i changed it to $var < 3
meaning the first 3 posts show excerpts and the rest just show the title
im still looking for a way to only show posts from a certain user or blog (or userS or blogS), we should be able to add lots of these widgets and have control of the excerpt showing or not or amount from the widget thing)
then you can feature certain blogs or users and have it set to maybe just one post, i think it would help tempt the visitors to checkout the blog/user if they can see the latest post rather than just a static advertisment if you were to just write a text link to ‘feature’ a blog/user, anyways any help would be much appriciated
<?php if ( !$counter ) : ?><br />
<div class=\\\"item-content\\\"><?php echo bp_create_excerpt($post->post_content) ?></div><br />
<?php endif; ?>It doesn\’t generate excerpts if content is non-English… It shows full content. Can I limit the excerpt words numbers?
- The topic ‘‘Recent Posts’ widget modification’ is closed to new replies.