
Juan Antonio Roig Bernat
5,543 PointsWhat the difference between "get_" and "the_" at the begining of the wordpress functions?
I don`t get understand really well the difference between "get_" and "the_" at the begining of the wordpress functions. Could someone explain this or share some good link or tutorial that treats this on deep please?
Thank you in advance.
1 Answer

Sue Dough
35,797 PointsGood question.
get_ just GETS the information to perhaps store in a variable
the_ will print the information out
<?php the_content(); ?>
will output
Test content
VS
<?php get_the_content(); ?>
will output nothing
To use get and output
<?php $content = get_the_content();
echo $content; ?>
will output
Test content
Juan Antonio Roig Bernat
5,543 PointsJuan Antonio Roig Bernat
5,543 PointsWow! Clear as water! :D Thank you very much Sue!
Sue Dough
35,797 PointsSue Dough
35,797 PointsGlad I could help.
:)