How to conditionally output to sidebar of each author’s archive and posts by each author?
As often the case, asking the question reveals the answer: Use global $authordata;. Fix php errors: == operator. Fix $rid=’445′, not $rid=445. Here’s the working code: add_action (‘genesis_before_sidebar_widget_area’,’user_testimonials’,10); function user_testimonials(){ if (is_author() || is_singular(‘post’)){ global $authordata; //using global $authordata is more direct $authorlogin = $authordata->user_login; //print_r( $authordata ); //to see everything if (is_author(‘author-1’) || ($authorlogin==”author-1″) … Read more