Hello @mattce
I trust you’re doing well!
I’ve tested the plugin on my end, by adding a sidebar to the Authors’ archive pages although could not replicate it. Would you please let me know what PHP version is running on your site?
I’ve also forwarded your feedback to our developers so they could review the code.
Thank you!
Kind regards,
Nastia
Thread Starter
mattce
(@mattce)
Hi Nastia, I’m using PHP 7.3.19 on this site.
If you google for
Trying to get property ‘ID’ of non-object class-custom-sidebars-replacer
you will also find some other sites with the same problem, so seems not a theme-related problem here (in my case I’m using a custom developed theme).
Hello @mattce
I trust you’re doing well!
We could not replicate the issue on our end.
Looks like the issue is related specificity to your site. The get_queried_object returns the object from the global $wp_query : https://developer.ww.wp.xz.cn/reference/functions/get_queried_object
So when on the author’s archive page it should return the WP_User object.
It looks like something altering the $wp_query on your site.
Please run a test for a conflict with another plugin or try the issue on vanilla installation.
– Deactivate all plugins, besides the Custom Sidebar,
– Switch to a default WordPress theme
See if the notice is still showing up.
– If all is well, switch to your custom theme and see if the issue is back
– If not, start enabling one plugin at a time till the notice will be back
Make sure to have a full backup of your site before running this test, so if something will go wrong you may always restore your site back.
Let us know how it went!
Kind regards,
Nastia
Hello @mattce
I’m closing this topic due to recent inactivity.
Feel free to post back any updates and we can reopen it and carry on. 🙂
Take care,
Dimitris