Update:
Ok,the DEBUG log says:
PHP Notice: Undefined offset: 0 in /home/content/00/8437600/html/test/wp-includes/query.php on line 3105
PHP Notice: Trying to get property of non-object in /home/content/00/8437600/html/test/wp-includes/query.php on line 3939
PHP Notice: Trying to get property of non-object in /home/content/00/8437600/html/test/wp-includes/query.php on line 3941
PHP Notice: Trying to get property of non-object in /home/content/00/8437600/html/test/wp-includes/query.php on line 3943
PHP Notice: Trying to get property of non-object in /home/content/00/8437600/html/test/wp-includes/query.php on line 3944
PHP Notice: Trying to get property of non-object in /home/content/00/8437600/html/test/wp-includes/query.php on line 3952
PHP Notice: Trying to get property of non-object in /home/content/00/8437600/html/test/wp-includes/query.php on line 3967
NOTE:
At the top of my author.php
I use the following code in order to get user meta for the page:
<? $curauth = (get_query_var('author_name')) ? get_user_by('slug',
get_query_var('author_name')) :
get_userdata(get_query_var('author'));
?>
End of update
Original Post
First – I am teaching myself how to write php and am also new to this forum.
I am trying to follow the instructions from the top answer for this question Author page: Comments and Ratings? to add comments to author.php – without any luck.
The following is the steps I have taken:
- Created a custom post type to hold the comments
- Created a new post in said post type
- Created custom field in user meta called -> author_post_id
- Added newly created post id to user meta for particular user Note: this works because I can add echo statement in the code provided and the above link and it echos the correct post id so I know I did something write (lol)
- Copy/pasted the code given on the above link (answer #3) into my author.php
Nothing is showing up. What am I missing?
I even added wp_reset_query();
after the loop that displays post by the author and it made no difference.
Here is my test author page http://test.thesingleparentperspective.com/author/ckmatthews/