Title tag on home using front-page template not showing
Fixed the bug, pasting the solution here. <?php if (is_front_page()) { echo ‘Home | ‘; bloginfo(‘name’); } else { wp_title(‘ | ‘, true, ‘right’); bloginfo(‘name’); } ?>
Fixed the bug, pasting the solution here. <?php if (is_front_page()) { echo ‘Home | ‘; bloginfo(‘name’); } else { wp_title(‘ | ‘, true, ‘right’); bloginfo(‘name’); } ?>
Special characters in post_title replaced by ‘?’
there are many ways to do this, but frankly, this is not a wordpress question it’s a php question. here is your code doing what you asked for $imageAttr = [ “class” => “alignnone size-medium”, “alt” => get_the_title(get_the_ID()), “title” => __(‘hi’, ‘theme-textdomain’) . ‘ ‘ . wp_trim_words(get_the_title(get_the_ID()), 2), ]; $variable = [] is just a … Read more
Here’s an untested edit of your code to use the post’s first category in the count: add_action(‘the_title’, ‘dk_auto_numbering’); function dk_auto_numbering($title) { $post_ID = get_the_ID(); $the_post = get_post($post_ID); $date = $the_post->post_date; $maintitle = $the_post->post_title; if ($maintitle == $title && $the_post->post_status == ‘publish’ && $the_post->post_type == ‘post’ && in_the_loop()) { $categories = get_the_category($post_ID); if (is_array($categories) && count($categories) … Read more
You should create a child theme and then edit the file where you want the dynamic text to appear. So if you want to show the text on single blog pages, you’ll simply use the single.php file in your child theme. More on WordPress child themes here: https://developer.wordpress.org/themes/advanced-topics/child-themes/
You can use the get_the_archive_title filter, such as: add_filter(‘get_the_archive_title’, function($title) { if(is_tag()) { /* logic to set $title to what you want */ } return $title; }); Take a look at get_the_archive_title() reference for more information on how to use this filter.
Change post title but not in widgets/menu/etc
The specific bit I’m having difficulty with: <?php the_title( $attachment_id ); ?> the_title() doesn’t have a post ID parameter, and the first parameter is actually a text/markup to prepend to the title. And note that attachments like images in the WordPress media library have their own posts, where the type (i.e. post_type) is attachment. the_title() … Read more
The video you have linked to is meant for the users of the Headway Themes. There is no option within WordPress itself to hide the title of pages. The video itself also does not show you how to hide the actual title, the option referred to is actually to hide the page from your navigation. … Read more
Wrapping everything in strtolower should work: <title><?php global $page, $paged; echo strtolower(wp_title( ‘|’, false, ‘right’ )); echo strtolower(get_bloginfo( ‘name’ )); $site_description = get_bloginfo( ‘description’, ‘display’ ); if ( $site_description && ( is_home() || is_front_page() ) ) echo strtolower(” | $site_description”); if ( $paged >= 2 || $page >= 2 ) echo strtolower(‘ | ‘ . … Read more