How to add condition is author archive on oxygen archive page

Sumit Singh
Sumit Singh
15 May 2022

Control the output of elements on archive pages based on the author archive

Here’s How

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Condition Author Archive Type

Code Screenshot and code:

<?php 
function check_archive_page(){
    if( is_author() == true){
      return 1;
    }
}
?>

Condition Screenshot in Archive page

If you can any query feel free connect on my FB page https://www.facebook.com/wploversteam/

Was this article helpful?

Tags

Categories

Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy