WordPress.org

Ready to get started?Download WordPress

Forums

PHP-Notice on author.php when no posts (5 posts)

  1. AlexNeo
    Member
    Posted 1 year ago #

    Hello my friends,

    i am using that theme: http://press75.com/view/debut/
    WB_DEBUG is true.

    There was no author.php so I made one. it works without problems, but I get a PHP-Notice-Error, wenn I visit an author page from an author, who is registered but doesnt release a post yet:

    Notice: Trying to get property of non-object in C:\xampp\htdocs\wp\wp-includes\post-template.php on line 30

    On line 30 is following code, which is called somewhere in wp_head (dont know where in detail):

    function get_the_ID() {
    	global $post;
    	return $post->ID;
    }

    do u know what can i do to remove that error?

    thanks a lot!

    alex

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    I'm sorry but as you are using a commercial theme, you need to seek support from the theme's vendors.

  3. AlexNeo
    Member
    Posted 1 year ago #

    Hm, dont you think this is a general problem related to all themes?

    Maybe anyone has a normal theme and can test it using a author.php and visiting this page of a user who has no posts (WB_DEBUG true!)?

    when this php-notice is at every theme, so i can live with this notification...

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    dont you think this is a general problem related to all themes?

    Sorry but no. I often include an author.php template file in my themes and I've never seen this error. So it would appear to be specific your the theme. Or your author template file.

  5. AlexNeo
    Member
    Posted 1 year ago #

    maybe you didnt see this error, because you never visit a author page from an author who has no written post?

    at an regular blog this case common does not exist - but i am using wordpress as a kind of community.

    maybe i will try it with a new installation...thank u

Topic Closed

This topic has been closed to new replies.

About this Topic