Menu item on a category
Menu item on a category
Menu item on a category
On most cases you should be able to use the_title filter to modify the title string. Use get_comments_number() to get the comments count for the post – of given ID or the current one. For example, add_filter( ‘the_title’, ‘wpse_427277_the_title’, 10, 2 ); function wpse_427277_the_title( string $title, $post_id = null ): string { $comment_count = (int) … Read more
It seems that the way you attached your function to the document_title_parts filter is wrong. As per WordPress documentation, document_title_parts only accepts one parameters, array $title. So it doesn’t make sense that when you have 2 parameters in your function. I suggest you do something like this: function custom_document_title( $title_parts ) { // Here is … Read more
CSS METHOD To hide with CSS this should do the trick for you. Add the following to the theme’s or child theme’s style.css, or to the Customizer’s CSS section: body.post-type-archive-product .bs-card-box.page-entry-title { display: none; } What we’re doing here is targeting the product archive template file that WooCommerce uses to dynamically create that page. By … Read more
i’ve already solved it, i had to change the $title = get_the_title(); to $title = get_post()->post_title; in the end it looks like that: <?php $title = get_post()->post_title; // Get the title string $parts = explode(‘ – ‘, str_replace(‘–’, ‘-‘, $title)); // Replace em dash with en dash and split the title $artist = trim($parts[0]); // … Read more
Two block markup examples are the post-title block: <!– wp:post-title /–> and the post-content block: <!– wp:post-content /–> that you can use in your single post template. See more here under the Query Loop list item: https://wordpress.org/documentation/article/blocks-list/#theme-blocks
That title is coming from archive.php file of TwentySixteen theme. You can find a <header> code section in that file. What you can do, simply copy the archive.php file as category.php and then remove the following code section from category.php file: <header class=”page-header”> <?php the_archive_title( ‘<h1 class=”page-title”>’, ‘</h1>’ ); the_archive_description( ‘<div class=”taxonomy-description”>’, ‘</div>’ ); ?> … Read more
$value is always empty because post ID is missing. Pass the parameter ($post object) to the hide_title_callback() function and get the post ID right way. Also, you should take care of nonces. <?php // pass the $post object function hide_title_callback( $post ) { // you have to verify this nonce inside `mysite_save_postdata()` // https://codex.wordpress.org/Function_Reference/wp_nonce_field wp_nonce_field( … Read more
Your site’s homepage has no description set. Since I see you are using a static page for the homepage, ensure that you are providing a description using Yoast SEO plugin when editing the page. Anyway, as in the screenshot, the homepage is not updated by Google (It takes sometime to update).
Change HTML Document Title On Localhost but not Server