Modal showing author box

Dear Support,
A while back you gave me a piece of code that I added to my functions.php that added the author box to the bottom of all my Blog post pages.

This was it:

function display_author_action( $content ) {

if ( is_singular('post') && !is_single( array(61669, 61670, 11449) ) ) {

$content.=do_shortcode('[x_author title="About the Author"]');

}

return $content;

}

add_filter( 'the_content', 'display_author_action', 20 );

Recently, I added a Modal popup for my optin form, and that Author box started showing in my popups (Check screenshot)

How can i stop the author box from showing in my popups ?

Thanks

Hey There,

Thanks for writing in! To resolve this issue, please have the code updated and use this instead:

function display_author_action( $content ) { 

    if ( is_singular('post') && !is_single( array(61669, 61670, 11449) ) ) {

        $content.=do_shortcode('[x_author title="About the Author"]');

    }

    return $content;

}
add_filter( 'the_content', 'x_before_the_content_end', 20 );

Hope this helps. Kindly let us know.

Hi @RueNel,

I tried this but it removed ALL my content from my blog pages.
I reverted to the previous one.

Please let me know of a different solution.
Thanks

Also,
The Modal post has a Class of “popuppress”.
Is there a way to exclude the author box being added to a particular post class ?

  • Just a thought.

Hey There,

​To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look?

To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

Thank you.

Sure @RueNel

I attached in secure note my details.

Please do not make any changes before letting me know.
This is how we track all changes done on our site.

Thanks !

Hi There,

Your custom code looks fine. We can add the custom CSS to hide the author box.

Please add this custom CSS under style.css file locates in your child theme:

.pps-content .x-author-box.cf {
    display: none !important;
}

Hope it helps :slight_smile:

Thanks a lot @thai That works perfectly !

You’re welcome!
We’re glad we were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.