Site logo

Archived topic

Author Box not Working

5 replies · Started by Atif on July 3, 2021

Viewing posts 1–6 of 6

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

<?php echo get_avatar( get_the_author_meta(‘user_email’), ‘130’, ” ); ?>
<h5><span class=”author-box-by”>by</span> <?php printf(get_the_author_meta( ‘display_name’) );?></h5>
<?php the_author_meta(‘description’); ?>

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.

My issue is more related to why the custom php is not working with theme instead of the custom code itself.

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 :)

This archived topic is closed to new replies.