The difference between get and the in WordPress

Across WordPress’s documentation and code, you might notice some functions that are named similarly, the difference being get_ added to the function’s name.

For example: the_title(); and get_the_title();


The use of the shorter version echoes the value. For example, if one were to use the following on this page:


“The difference between get and the in WordPress” would appear on the page.


The get version returns the value. If you wanted to display the title on the page using this function, you would use it as so:

echo get_the_title();

Sharing is caring!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top