I'm running some code through phpStorm and am getting an error:
Method 'post_title' not found in class.
at this line:
echo $post->post_title();
Is that phpStorm getting things wrong or am I accessing post_title
incorrectly?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityTwo lines of code could hide many things but I find an error: post_title is an attribute and not a method.
echo $post->post_title;
Reference: https://codex.wordpress.org/Class_Reference/WP_Post
$post
object?