New answers tagged

0

This really depends on your theme. Somewhere in its template files the title is generated, including the anchors. This differs per theme, but you'll have to look for something like this: echo '<a href="'. get_permalink . '">' . get_the_title . '</a>'; If it is hard coded like this, you'll have to choice but to override it by making a ...


1

If you want to change only the text you can hook into default_page_template_title add_filter('default_page_template_title', 'bt_change_default_page_template_title', 10, 2); function bt_change_default_page_template_title ($text, $meta) { if ($meta === 'meta-box') return 'My custom template'; return $text; } Add this code into functions.php and thats ...


0

@Baikare Sandeep : Hi, it is not a path problem. my config.php is at the theme's root. I can access it in my templates and functions.php with require ( get_template_directory() . '/config.php' );


0

It is depends on where your config.php file is located. Write code in active theme's functions.php If file is on root of WordPress installtion: require_once(ABSPATH .'config.php'); If it is on active Theme's root directory: require_once('config.php');


0

So, this is what I finally think: the_date() and the_time() purpose is to display published date and time, even if in the documentation they said they display or retrieve the date/time the current post was written. my error comes from the fact that I expected to have the date of writing (draft) in the absence of the date of publication; And unfortunately all ...


0

the_date(): By default, it will echo the date of the post in the format F j, Y, so if the post was published on 20 November 2018, it would echo November 20, 2018. get_the_date(): This fetches the date and doesn't echo it out. To echo it, you'd use echo get_the_date(), which gives you the same result as the_date(). It's useful if you're already using echo in ...


Top 50 recent answers are included