The built in php wordpress functions are not reading in my VScode and its really bugging me because it is showing yellow/orange swiggly lines.
<h2><a href="<?php the_permalink();?>"><?php the_title(); ?></a></h2>
<?php the_content();?>
<hr>
<?php }
get_footer();
?>
Word Press functions not registering in VScode
3
Answers
I figured it out. It turns out I needed to open the PHP files in my root folder in order for the WordPress functions to be acknowledged by VScode.
I suggest to install a specific extension:
https://marketplace.visualstudio.com/items?itemName=johnbillion.vscode-wordpress-hooks
if this could help someone facing the same issue, here is what worked for me:
download PHP_Intelephense Here if not already installed.
Then in VsCode go to : settings (ctr+,) > Extensions >Intelephense,
then find your intelephense.stubs, add WordPress and save changes.
See this screen shot