Elyx
Forum Replies Created
-
Same happened for one of our clients website that broke internal linking. For anyone needing a solution, here are some https://premium.wpmudev.org/blog/removing-category-base-urls-wordpress/ I went with “Another possibility” because first option in that post still relies on some plugin, yet second one is more “core WP solution” that I doubt will be removed so freely how it’s done with plugins. Tho it might not work for sub-categories
Forum: Plugins
In reply to: [LH Archived Post Status] Hide archived posts in backendThere is something like “show_in_admin_all_list” when new post status is registered that won’t work for some cases, and there is a bug in WP core opened for the past 5 years https://core.trac.wordpress.org/ticket/24415 So instead of using simple true/false that could handle this, we need a filter. Because this can’t be that easy ;o) Either way, this is what I used with simple JS count fix. If anyone use this, you might need to adjust to your needs.
function hide_archived_from_all_view($wp_query){ if(!is_admin()){ return; } if(isset($_GET['post_status'])){ return; } $screen = get_current_screen(); if('edit' !== $screen->base){ return; } if($wp_query->is_main_query()){ $wp_query->query_vars['post_status'] = [ 'publish', 'private', 'future', 'draft' ]; } } add_filter('pre_get_posts', 'hide_archived_from_all_view'); function hide_archived_from_all_view_count_fix(){ $screen = get_current_screen(); if('edit' !== $screen->base){ return; } ?> <script> document.addEventListener("DOMContentLoaded", function(event){ var total = document.querySelector('.subsubsub .all .count').innerHTML.match(/\d+/g).map(Number)[0], archiveCount = document.querySelector('.subsubsub .archive .count').innerHTML.match(/\d+/g).map(Number)[0]; document.querySelector('.subsubsub .all .count').innerHTML='('+(total - archiveCount)+')'; }); </script> <?php } add_action('admin_print_scripts', 'hide_archived_from_all_view_count_fix');Forum: Plugins
In reply to: [LH Archived Post Status] Hide archived posts in backendHey Pete, thanks for the info. I will add necessary filters myself, just wanted to know if there are any build in. I will post it here when I’m done in case someone else need this.
Thanks for the plugin!
Forum: Plugins
In reply to: [Rename Media Files: Improve Your WordPress SEO] Filename removedWell actually I’ve just checked (sorry, a bit brain freeze, I saw attachment (image) showed and didn’t actually checked full filename..) and I see that attachment from regular file field from contact form 7 also have it’s filename removed and only extension is left.
Forum: Plugins
In reply to: [Rename Media Files: Improve Your WordPress SEO] Filename removedHey Pablo!
I didn’t had a chance to blink and you replied! ;o) kudos.
I have Filename structure: ‘{siteurl}{posttitle}{filename}’
To separate: –Rules enabled:
Accents – Converts all filename accent characters to ASCII characters
Lowercase – Converts all filename characters to lowercase+ removing “All non ASCII characters”
The same files uploaded via wordpress media have their filenames just fine. Problem is only with files sent by this multifile field. Regular file field from contact form 7 don’t have this issue, because they don’t store file in uploads but simply attach it to mail.
Forum: Everything else WordPress
In reply to: Please explain two new 4.9 featuresOk, they are in customizer, but… where? Where is that preview link? Do the theme itself must support it somehow? Also, that preview link is only for design, and not for content on particular page/post? Because option to share a draft with someone to get feedback would be neat.
Hey John!
I really appreciate that you took time and explain reasons behind this. This of course make sense. The only suggestion from my part would be to link facebook address with “www.” at the beginning, but this is more of a cosmetic change, and nothing crucial.
Have a great day! And thanks again :o)
Hi David!
Thanks for a quick response. Actually I think I found what is happening after your demo setup. The issue is that all links are build with “facebook.com” instead of “www.facebook.com”. Not sure if this is something you parse when you get posts from facebook API or this is what you get from API itself, but this was a reason why I got an error. I thought the link was build wrong (as it’s id instead of page name), but it was an error on my end that it simply didn’t redirect me from facebook.com to http://www.facebook.com and thus the confusion.
So it’s kinda not a bug, but a bit of a bug as it should link to page without redirects if possible, but either way, problem solved.
Thanks for your time and sorry for taking it ;o)
Have a great day.Forum: Plugins
In reply to: [Fast Velocity Minify] Fewer queries with each page refreshHey Raul, thanks for the quick answer.
Actually, the plugin shows queries that are made to database and not pulled from cache. I’ve just checked, and I found a reason. Those options simply aren’t in my database = not in wp object cache. If user never save settings in the plugin (which isn’t that uncommon since plugin works without any changes after activation), wp will make that query.
I’ve just simply hit “save changes” in the “settings” tab of your plugin and options now are in database and total query count dropped from 81 to 57. So if those options find their way to database, then it’s true, it’s autoloaded and this is exactly what I had in mind. Sorry I didn’t found this sooner. I’ve found this when I wanted to make sure they are autoloaded, and found they aren’t in database ;o)
I’m looking for a perfect setup of plugins for all of my clients (with different hosting providers, server setups etc) and making sure there aren’t any unnecessary queries is part of that, and full page cache is the last step.
So for now, I will add to my todo to hit “save changes”.
Thanks for your time and tips.
Hi,
I know that this has been set as “resolved” but it still makes 22 queries with each refresh – which is a lot. I am not sure if this has been fixed and there was even more queries, or it never did went to the live version of plugin. Has this been pushed to production?
Thanks dwinden for your answer, not sure what’s your relation to this plugin but I noticed you’re very active here (unlike the authors ;o))
If those options are loaded with each refresh, then loading them into memory isn’t a bad thing imo. But yes, if the whole code is build with add/delete then this isn’t something anyone could consider because yes, gain wouldn’t be THAT significant if you use few plugins. Though if you have more than a few, and each of them make few queries to options that do not exist in database, or simply aren’t autloaded, then this is worth to try to cut some of them, because if you consider whole wordpress installation and all plugins the gain could be significant.
Anyway thanks again for taking time to answer :o)
Also just as an information, I use Query Monitor to debug https://wordpress.org/plugins/query-monitor/
yep. I see those queries in the backend too. In the frontend for both logged in and logged out users.
In the backend there is 13 queries in total called. Those 5 that show up in frontend + one (itsec_file_change_warning) I think could be added to database to cut those queries http://prntscr.com/ap8ig5 <- on screenshot there is 12 queries because I’ve added to database manually itsec_config_changed to see if this will cut the query and it did.
Forum: Plugins
In reply to: [Advanced Custom Fields: Font Awesome Field] Slight performance boostHey Matt, thanks for your reply.
The plugin is called Query Monitor https://wordpress.org/plugins/query-monitor/ and is the best plugin for debugging wordpress out there. And it’s not only for mysql queries. I really recommend it.
I will contact Mickey and let you know with the results.
Thanks again :o)
Forum: Plugins
In reply to: [Contact Form DB] Multiple queries for get_optionAwesome, this are very good news! Thank you so much Michael :o)