Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter dementetech

    (@dementetech)

    Hi, thanks for answer.

    Ok let me explain the problem better.

    I create a sidebar an I choose to replace the “right sidebar” in “any author archive”

    Sidebar Location option

    But that did not work. I dig into the code and I think I saw where is the problem.

    In the file “inc/class-custom-sidebar-replacer.php” the function “determine_replacements” (in the comment said THIS IS THE ACTUAL LOGIC OF THE PLUGIN)

    There is some sort of conditions to decide when to replace the sidebar. I debug the code rendering an author archive page and it enter in this condition

    } elseif ( ! is_category() && ! is_singular() && get_post_type() != 'post' ) {
    			// 4 |== Post-Tpe Archive ----------------------------------------------
    			// <code>get_post_type() != 'post'</code> .. post-archive = post-index (see 7)

    The Author archive page is not a category page nor a singular and no have not post type.

    This “if” its set before the actual is_author option:

    	} elseif ( is_author() ) {
    			// 9 |== Author archive ------------------------------------------------
    

    So the function never enter this if.

    Please let me know if you can reproduce this error.

Viewing 1 replies (of 1 total)