Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you tried selecting the wp_reset_query option at the bottom of the main widget page? Give it a shot, it could be your theme, selecting this option will sometimes fix the issue.

    I also read somewhere that the plugin does not seem to work properly with the new WP release, not sure if that issue has been resolved or not.
    I personally cannot get it to work at all

    is_author “checks if an Author archive page is being displayed”

    http://codex.wordpress.org/Function_Reference/is_author

    Do you want to show a widget to a logged in user who is the author of the displayed post?

    There is a global $userdata, and $userdata->ID is the ID of any logged in user.

    I don’t know what the simplest way of getting the post author ID is, but a long way round is to use the global $wp_query, something like…

    $author_obj=get_userdata(($wp_query->post)->post_author);

    not sure if you can do it as concisely as that you may, you may have to break that down into evaluate each -> first. Then when you have $author_obj and $userdata, you can use

    return ($author_obj->ID)==($userdata->ID);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is_author() for the post’ is closed to new replies.