Boris Kuzmanovic
Forum Replies Created
-
Try this quick and dirty fix. Replace line 464
switch($page->context)
with
//switch($page->context) switch(((array) $page)[chr(0) . '*' . chr(0) . 'context'])
Hope it works for you as well.
- This reply was modified 6 years, 2 months ago by Boris Kuzmanovic.
- This reply was modified 6 years, 2 months ago by Boris Kuzmanovic.
Forum: Plugins
In reply to: [Doc's Auto-tags] A bug foundAnother bug found. This relates to non-functioning categories.
Parameters are reversed in wp_set_object_terms function call. At around line 67, you’ll find:
wp_set_object_terms( $post->ID, 'category', $categories, TRUE ); // TRUE means append
with this one:
wp_set_object_terms( $post->ID, $categories, 'category', TRUE ); // TRUE means append
On the Settings page, use the category slug and it should work. For example:
Pattern: Miles Davis
Categories: jazz-slugI think your problem is in your theme markup. Try switching to a default theme and let us know if it works.
Forum: Plugins
In reply to: [Yoast SEO] Default Facebook OG image no longer workingSame here. When I used FB debugger (https://developers.facebook.com/tools/debug) it reported the og:image to be smaller than 200x200px.
Looking for a way to modify the default og:image size.
Hi Jeremy,
I added your code to functions.php, but it doesn’t seem to get executed at all. Even when I put some debugging code in that function to write to a file, it doesn’t get written.
Moreover, when I put some code in class.jetpack-post-images.php, get_images function it doesn’t get executed.
I must be missing something obvious here.
Pods plugin does all the CPT work for me. I looked at it and it seemed a little complex to modify. Instead, I applied the one line patch (URL below) to Jetpack and it worked great.
https://github.com/Automattic/jetpack/commit/5870427825dca7e42c9ad89b5b68cf79226442bf
Forum: Plugins
In reply to: [WordPress Social Login] Varnish and WSL anyone?Ran into this myself today. Here’s a fix that works.
The default.vcl script is most likely removing cookies needed for social login to work. Skip caching of anything passed to a URL that starts with
/wp-content/plugins/wordpress-social-login/hybridauth/?Here’s what I have:
sub vcl_recv { # lines skipped here # Do not cache these paths if (req.url ~ "^/wp-cron\.php$" || req.url ~ "^/xmlrpc\.php$" || req.url ~ "^/wp-admin/.*$" || req.url ~ "^/wp-includes/.*$" || # Allow WP Social login to bypass Varnish cache req.url ~ "^/wp-content/plugins/wordpress-social-login/hybridauth/\?" || req.url ~ "\?s=") { return (pass); } # Define the default grace period to serve cached content set req.grace = 6h; # By ignoring any other cookies, it is now ok to get a page unset req.http.Cookie; return (lookup); }
Hope it helps.
Forum: Plugins
In reply to: [Advanced lazy load] breaks other pluginThis is kind of a late reply, but it might help others.
In my case it was breaking the layout of the title which contained the string “src”. The problem is with the regex that easily matches codes outside of the tag. I fixed it by modifying the line 154 of advanced_lazyload.php:
From:
$pattern = '/((?:\<img).*)(src)/';
To:
$pattern = '/((?:\<img)[^>]*)(src)/';
This regex matches all characters other than ‘>’, which is a closing bracket in HTML. Author’s regex would match past the closing bracket.
Hope it works for you.
Forum: Plugins
In reply to: [Async JS and CSS] PageSpeed Insights keeps naggingI’ve tried to optimize some of my sites to have a high PageSpeed. From my experience, the best performance I got with respect to CSS was when I loaded it asynchronously via JS.
<head> ... <script async type='text/javascript'> function loadCss(url) { var link = document.createElement('link'); link.type = 'text/css'; link.rel = 'stylesheet'; link.href = url; document.getElementsByTagName('head')[0].appendChild(link); } </script> <script type='text/javascript'>loadCss('/css/minified.css')</script> </head> ...
The only problem is that the page flickers in that split second before the CSS is loaded. You can fix it by adding this line to head:
<style rel='stylesheet' type='text/css' />html {margin: -9999px;}</style>
and than add
html { margin: 0 auto; }
at the top of your minified CSS. You can demo it at http://www.serbiancafe.com/.
Forum: Plugins
In reply to: [Async JS and CSS] PageSpeed Insights keeps naggingThomas van der Beek,
Did you try to optimize the CSS by following Google’s instructions and adding the link to your CSS in <noscript> after </html>?
https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery#example