Archived topic
Author Box not Working
5 replies · Started by Atif on July 3, 2021
I migrated a site today to WpEngine
I was using a custom author box with the PHP and CSS mentioned below. It was working fine before the migration. but now it is all blank. I can see the CSS styes and also “By” written in the custom author box, but no other information shows.
I should mention here that I am by no mean have any idea about how the code works. I just copied it from support forum and articles online.
I had made a hook using this PHP
I used the following CSS and put it “Additional CSS” section in the theme customizer:
.author-box{
background: #ffffff;
padding: 40px;
overflow:hidden;
}
.author-box-avatar{
float: left;
margin: 0 20px 0 0;
}
.author-box-avatar img{
border-radius:100%;
border:5px solid #f1f1f1;
}
.author-box-description h5{
font-size: 24px;
margin-bottom: 10px;
font-weight: bold;
text-transform: capitalize;
}
If you visit the linked page, you could see the box at the bottom. The only word written is “By”.
Also if it helps:
– in the Elements in the “Execute PHP” label it reads “Unable to execute PHP as DISALLOW_FILE_EDIT is defined.”
– I had a chat with the support of the new host. He said they can’t help with scripting but he said something about providing them cookie/argument to be exempt if that helps, but he wasn’t too sure about what this is either.
Hi there,
We can't help with custom solutions here.
However, using a dynamic block element is the best way to go.
Here are some examples:
https://youtu.be/J-VIWJiJBDQ
https://youtu.be/4x6CjGOyagc
https://youtu.be/1E7zFl678kg
My issue is more related to why the custom php is not working with theme instead of the custom code itself.
You can read more about the warning message here:
https://docs.generatepress.com/article/disallow-php-execution/
The method with the block element is definitely the better way to go.
Hi Leo,
I tried the block method. Very intuitive and it works perfectly. Thanks for that i'll bookmark the videos.
Best
Glad to hear :)