page title showing twice [closed]
page title showing twice [closed]
page title showing twice [closed]
Hide title block on edit screen in Gutenberg
Your theme is adding a large amount of padding to the .single-post__featured-img–layout-1 class: 100px top and bottom, or 180px for screens wider than 1025px. Look in https://eric.frydendal.org/wp-content/themes/blockst/style.css Try Css code .single-post__featured-img–layout-1 { padding: 20px 0px; }
I think perhaps what you want is either <?php if ( !is_front_page() ) : ?> <h2> <?php wp_reset_query(); ?> <?php echo $post->post_type; ?> </h2> <?php endif; ?> if you’ve done a custom front page that shows the blog posts, or <?php if ( !is_home() ) : ?> <h2> <?php wp_reset_query(); echo $post->post_type; ?> </h2> <?php … Read more
The return function doesn’t require (). So you’d want your function to look like this: function wpse_set_document_title_separator ( $sep) { return ‘-‘; } add_filter( ‘document_title_separator’, ‘wpse_set_document_title_separator’ );
I need to make the title of the page dynamic in my custom plugin
I have been working on this solution, I have come up with a different idea to implement this – I have added two different meta boxes, one with First Name, the other with Last Name Then I have hooked a function with save_post_{$post->post_type} hook like this – add_action( “save_post_{$post->post_type}”, “update_post_data” ); function update_post_data( $post_id ) … Read more
The call to get_the_ID() possibly worked by happy coincidence of there being an available post object to pull the ID from. However, realistically you should have been looking at data available to the filter for this ID instead, here’s how. First update you add_filter declaration to bring in the second variable from wp_insert_post_data. add_filter( ‘wp_insert_post_data’ … Read more
By default single_cat_title(), a wrapper for single_term_title(), outputs the category name. Try replacing that call with single_cat_title(”,false).
The function wp_title() is supposed to be used to generate the text for the title tag: <head> <title><?php wp_title();?></title> … </head> but to display the current post title within the loop, you should instead use the the_title() function.