What is the wordpress page title php code?
Try below code. global $post; echo esc_html( get_the_title($post->ID) );
Try below code. global $post; echo esc_html( get_the_title($post->ID) );
Its documented.. heres a fix
I wound up fixing it like this. All pages now work. But it looks …well …ugly. <?php if (function_exists(‘is_tag’) && is_tag()) { single_tag_title(‘Tag Archive for "’); echo ‘" | ‘; } elseif (is_archive()) { wp_title(”); echo ‘ Archive | ‘; } elseif (is_search()) { echo ‘Search for "’.esc_html($s).’" | ‘; } elseif (!(is_404()) && is_single() … Read more
It’s simple: Don’t forget to move add_filter to functions.php file 🙂 <?php /* Template Name: No Title Page */ add_filter( ‘the_title’, function ($title) { return “”;}); ?> <?php get_header(); ?> <div class=”wrapper”> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( ‘content’, ‘page’ ); ?> <?php endwhile; // end of the loop. ?> </div> … Read more
Using get_the_title() will work for you: <h1><?php echo get_the_title(); ?></h1><span>YOUR CUSTOM CONTENT</span>
add_filter(‘document_title_parts’, function($parts){ if( is_search() ){ $parts[‘title’] = sprintf(‘You searched for: %s’,get_search_query()); } return $parts; });
resolved, link : codex.wordpress.org/Category_Templates
You’re talking about the format setting which was introduced in WP 3.1 for the posts post type? No, I don’t think this is possible. To remove the title-, editor- or any other metabox, you have to remove the support for this feature from the current post type. (e.g. remove the feature from the supports parameter … Read more
well.. it is not exactly the case, but in a way, it is . every page has actually “2” names , one is the name you give and one is the ID, which is the number. If you will give a “name” which is a “number” – it might override another entity (Can be a … Read more
as this is a default field, i don’t think it is possible to achieve what you want with the help function hooks, however you can do this by editing edit-form-advanced.php file inside wp-admin folder, the code you may want to edit is located in line # 291, this is the input type for title field … Read more