- This topic has 7 replies, 3 voices, and was last updated 3 years, 2 months ago by
Leo.
-
AuthorPosts
-
December 23, 2022 at 6:09 am #2471502
Kiva
Hi
I’ve tried adding the Element and CSS code that I found on Wp Logout but the author box doesn’t show up properly. I just get an empty box with 3 periods. Here’s a screenshot of the code I had used: https://drive.google.com/file/d/1VDPVcklmt0palnT5gI_LncXEWS6UYgSB/view
Could that “unable to execute PHP” message be the issue? I’ve added other Elements before that worked yet had that same message so I don’t know if it would be an issue.
Note that I am not using GenerateBlocks so the answers and videos I saw on the forum regarding using blocks don’t work for me.
December 23, 2022 at 12:16 pm #2471856Leo
StaffCustomer SupportHi there,
Your screenshot shows that there is PHP in the code:
https://www.screencast.com/t/sKyIaiUCASETherefore you would need to Execute PHP for the code to work.
See more info here:
https://docs.generatepress.com/article/disallow-php-execution/January 8, 2023 at 6:34 am #2487816Kiva
I changed “true” to “false” in that line of code in the wpconfig but I still get the Unable to execute PHP as DISALLOW_FILE_EDIT is defined error. I’ve tried clearing caches, but it still shows up.
Is there something else I should do?
Alternatively, is there a way to get a bio box without having to allow file editing? I’d prefer an alternative way as I’d rather not allow file editing since it makes the site less secure. I’d rather not use a plugin just for this one thing.
January 8, 2023 at 10:23 am #2488097David
StaffCustomer SupportHi there,
you can visually build one using a GP Block element:
https://docs.generatepress.com/article/block-element-hook/
And theres a couple of videos on our YouTube channel showing you how to build an Author Box:
Static Content – If the site only has one author:
Dynamic Content – If the site only has multiple authors:
January 8, 2023 at 11:55 am #2488162Kiva
Thanks, but I should have mentioned that I don’t use Generateblocks. I’m just looking to use Gutenberg.
January 8, 2023 at 12:21 pm #2488187Leo
StaffCustomer SupportUsing GB is definitely the best solution.
If you are not using GB then a third-party author box specific plugin like this would be my recommendation:
https://wordpress.org/plugins/simple-author-box/Unfortunately we cannot help with implementing a custom solution from another source.
January 8, 2023 at 12:31 pm #2488193Kiva
OK, then I’ll do it the basic way then. Can you refer to the first part of my reply:
I changed “true” to “false” in that line of code in the wpconfig but I still get the Unable to execute PHP as DISALLOW_FILE_EDIT is defined error. I’ve tried clearing caches, but it still shows up.
Is there something else I should do?
January 8, 2023 at 2:49 pm #2488249Leo
StaffCustomer SupportThere could be a security plugin or built-in server security blocking it as well.
There are several suggestions in the documentation article I linked in the first replay including defining a constant:
define( 'GENERATE_HOOKS_DISALLOW_PHP', true ); -
AuthorPosts
- You must be logged in to reply to this topic.