-
Author
-
September 16, 2017 at 20:33 #173917excellinsParticipant
Hello, using a mobile phone, click the load more button on buddypress main activity stream,
when the load more button is clicked on several times (try to do that 10 times or more) typing feedback starts with a very slow response..
eg when i click load more 5 to 10 times of more and i click on a button to reply a comment when i try to comment example “this is a boy” when i type that it doesnt regiter fast it register very slow
September 16, 2017 at 21:08 #173918Kieran_SQModeratorHi,
Thanks for reaching out about issues you’re experiencing with load. I’ll break this down over a few different points as there are a few things going on here.
– Site performance is not ideal, on a desktop computer with plenty of RAM, a fairly good processor and a good internet connection it took 24s to load your main activity page without ads and 28s with ads. You need to look into carrying out performance tweaks, using more aggressive caching and maybe upgrading your hosting if you’re on a shared plan.
– Your feed is set to show 20 items. Clicking the ‘load more’ button 10 times would mean you are loading 200 BuddyPress activity items, of which, on the first load, over 50% of the items were either videos or images / image gallery posts. Loading (on average) over 100 videos and images / image galleries is going to exhaust the RAM available on most phones and tablets which would cause the slow typing issue and may even cause the browser to exit. You should consider setting the number of items in the feed to a lower amount.
– Consider lazy loading YouTube and Vimeo videos with a plugin to limit how many videos are loaded. A plugin that may be of use is https://wordpress.org/plugins/lazy-load-for-videos/. There are other free / premium plugins available through the WordPress repository and marketplaces such as CodeCanyon.
– You have 13 sidebar items, 11 of which are dynamic items which take time to load. Consider using a plugin to limit any unnecessary (for mobile) items being called. There are many plugins available in the WordPress repository for widget options / dynamic widgets you can use wp_is_mobile to define what to call and what not to call. See more on this here https://developer.wordpress.org/reference/functions/wp_is_mobile/.
Hope this helps,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
September 16, 2017 at 22:59 #173921excellinsParticipantWow thanks for this, please can you direct me on how to:
1. reduce the number of feed.
2. and how to limit any unnecessary widgets on mobile, also please any idea on how to use wp_is_mobile? please i am not a developer but i can follow your instructionsSeptember 16, 2017 at 23:32 #173922Kieran_SQModeratorHi,
To limit the amount of items the feed displays please review this in depth article by WebDevStudios https://webdevstudios.com/2015/05/14/buddypress-loop-filtering/ it shows you how to limit site activity and user activity feeds.
With regards to wp_is_mobile and !wp_is_mobile you can use this statement within the Widget Logic plugin https://wordpress.org/plugins/widget-logic/. Open up any widget after installing and you will see a field titled ‘Widget Logic’. Enter either wp_is_mobile or !wp_is_mobile in this field depending on whether you want to show the widget or not on mobile. You can see more information about using ! or not in the plugin’s description. The easiest way to understand this plugin and WordPress logic is to simply try it.
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
September 18, 2017 at 22:42 #174033excellinsParticipantHello, i just saw this code from the link you provided, should i add this code the functions.php file? or where can i add it. Also i want to change the 5 value to 10, will this reduce the activity stream updates to 10??
function my_filter_activity( $loop ) {
// only fetch the last five entries if we’re on a user’s activity page
if ( bp_is_user_activity() ) {
$loop[‘per_page’] = 5;
}return $loop;
}
add_filter( ‘bp_after_has_activities_parse_args’, ‘my_filter_activity’ );September 18, 2017 at 22:55 #174034Kieran_SQModeratorHi,
As per the code’s description the number 5 relates to the number of activity items, you can change this to any number you desire.
The code you have there is for limiting the member’s profile feed, you will need to use the example below in the article to limit the main feed. You can remove the other scope items if you wish, your code will end up something like this.
COPY CODEfunction limit_main_activity( $loop ) { $loop['per_page'] = 5; return $loop; } add_filter( 'bp_after_has_activities_parse_args', 'limit_main_activity' );
You can use both of these snippets in your KLEO Child theme’s functions.php, make sure to clear and purge all caches and CDN’s to see changes. If the code does not appear to work you can try it in a bp-custom.php file, you can read more about that here https://codex.buddypress.org/themes/bp-custom-php/.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
September 18, 2017 at 22:58 #174035excellinsParticipantok Kieran, i will use this to limit the main activity stream feed to 10, is this ok? also will it limit the activity of members too?
function limit_main_activity( $loop ) {
$loop[‘per_page’] = 10;
return $loop;
}
add_filter( ‘bp_after_has_activities_parse_args’, ‘limit_main_activity’ );September 18, 2017 at 23:04 #174038Kieran_SQModeratorHi,
The two pieces of code are independent of each other, if you wish to limit both the main feed and the member’s profile feed then please use both snippets in your functions.php file.
Please do not use the version you pasted into your reply as it was not formatted as code. This changes the backtick and will not work as they’re not supported characters.
COPY CODE// Limit the main activity feed to ten function limit_main_activity( $loop ) { $loop['per_page'] = 10; return $loop; } add_filter( 'bp_after_has_activities_parse_args', 'limit_main_activity' );
COPY CODE// Limit the members activity feed to ten function limit_members_feed( $loop ) { // only fetch the last ten entries if we're on a user's activity page if ( bp_is_user_activity() ) { $loop['per_page'] = 10; } return $loop; } add_filter( 'bp_after_has_activities_parse_args', 'limit_members_feed' );
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
September 22, 2017 at 22:28 #174422excellinsParticipantHey Keiran thanks i did this and it worked.. i hope this makes the site more responsive.. can i upgrade to PHP 7.1? my host supports this and i am currently still on php 5.6
September 22, 2017 at 22:34 #174424Kieran_SQModeratorHi,
KLEO does work with PHP 7.1 and that’s the specific version I use on my site, however, you should check to see if all of your plugins support PHP 7.X
If they do, it is well worth upgrading the PHP versions as the performance increase is considerable on some hosts. As always, please make a full database and files backup before making changes.
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
September 22, 2017 at 22:39 #174425excellinsParticipantYes its ok, also below is my php 5.6 version which is current, my host suggest i migrate to php 7, do i need to tick and untick any of those or proceed with the upgrade.. i have backed up my files and db
Attachments:
You must be logged in to view attached files.September 23, 2017 at 02:49 #174457Kieran_SQModeratorHi,
You’ll have to confirm with your host which option(s) need to be checked in order for everything to fully function. They’ll have a much better overview of your setup and their hardware/software.
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
-
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.