Functions & Shortcodes

Asked on February 28, 2017 in How To.

Hi Guys,

I am using layers child theme and i want my published time to post somewhere on the one of my pages (not posts).

I have tried adding the following to my functions.php file:

function shortcode_post_published_date(){
 return get_the_date();
add_shortcode( 'post_published', 'shortcode_post_published_date' );

and simply using the following shortcode:


But no luck i just get [post_published] in the page. 

Any advice?

contact Layers User
0 Answer(s)