How to get current page title inside a page itself in a shortcode and in page content

When i add the

<?php the_title(); ?>

to a page template file it works and is able to pull the page title inside html tags however if i wanted to add

<?php the_title(); ?>

to a single page itself how would i do so?

Also to provide more context; i want to add the

<?php the_title(); ?>

inside a shortcode in order to have the shortcode replace part of it with the specific page’s title, how would i do that?

For Example: the shortcode [products columns=”3″ attribute=”season” terms=”warm” orderby=”date”] Except replace the seasons with the page title… thanks!

Read more here:: How to get current page title inside a page itself in a shortcode and in page content

Leave a Reply

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