How can I add a title to this ‘maintenance mode’ function?

You can pass a title to the wp_die() function or even any other HTML content like heading tags: https://codex.wordpress.org/Function_Reference/wp_die But if you are trying to have more control over what’s being outputted, you should use the template_include filter and use your custom template: https://codex.wordpress.org/Plugin_API/Filter_Reference/template_include EXAMPLE: add_filter( ‘template_include’, ‘show_maintenance_page’, 99 ); function show_maintenance_page( $template ) { … Read more

How come I get internal server error even with try catch for get_the_title in functions.php?

You can avoid hard coded title tag in your theme template. Just use theme support. add_theme_support(‘title-tag’); OR, If you want to use title tag then you can do something like this. <title><?php wp_title(‘|’, true, ‘right’);?></title> You can then apply filter as /** * Filters wp_title to print a neat <title> tag based on what is … Read more

Change meta data of pdf file

Google also pulls information from the PDF file itself. To truly fix the files, you’ll need Acrobat Pro. You can then edit the embedded title, and you then delete the original and upload a new one. If these PDFs are associated with specific Posts or Pages, it’s safest to go to that individual Post or … Read more

woocommerce related product title length

Problem solve based on this article https://designsmaz.com/how-to-short-woocommerce-products-title/#comment-76957 Basically I just replace the <?php the_title(); ?> to <?php $shorttitle = mb_substr(the_title(”,”,FALSE),0,45); echo $shorttitle; if (strlen($shorttitle) >44){ echo ‘&hellip;’; } ?>

Set category page title in custom theme [closed]

In your functions.php of your theme file add the following code, taken from Remove “Category:”, “Tag:”, “Author:” from the_archive_title. add_filter( ‘get_the_archive_title’, function ($title) { if ( is_category() ) { //being a category your new title should go here $title = single_cat_title( ”, false ); } elseif ( is_tag() ) { $title = single_tag_title( ”, false … Read more

remove the title attribute from links [closed]

You could provide some more details, like what title attributes you are trying to remove. In the navigation, content, etc. Anyway, you could try adding this to your theme or child theme’s functions.php file, I have yet to test it though. function remove_title_attributes($input) { return preg_replace(‘/\s*title\s*=\s*([“\’]).*?\1/’, ”, $input); } add_filter(‘wp_list_pages’, ‘remove_title_attributes’);

How to put post title or keyphrase in content on different places automatically?

You can search-replace those placeholders with the_content filter. function custom_the_content( $content ) { return str_replace(‘{placeholder}’, get_the_title(), $content); } add_filter(‘the_content’, ‘custom_the_content’); Note: I don’t recommend using *** or similar as a placeholder, as it can be commonly used. That is why I’ve used {placeholder}. UPDATE: Based on the comments below, if you need to search-replace multiple … Read more

how can i remove page title on desktop view

Write the CSS into style.css file @media only screen and (min-width: 768px) { .single-product .title-desc { display: none; } } .single-product CSS will only work on single product details. It will not create any issue on other pages.

change title page on search result

To change document title use document_title_parts.filter. You want to apply changes only on the search page (as indicated in the title), so you should use is_search() conditional tag (or is_archive() as you suggest in the comment) and your code from php file. add_filter( ‘document_title_parts’, ‘se333744_site_title’ ); function se333744_site_title( $title ) { global $wp_query; if ( … Read more

Why in my query is display two title?

Try this. The code has comments where modified. <?php // args $args = array( ‘showposts’ => 5, ‘post_type’ => ‘post’, ‘orderby’ => ‘date’, // ‘order’ => ‘ASC’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘type_id’, ‘value’ => ‘News’, ‘compare’ => ‘LIKE’ ), ) ); // query $the_query = new WP_Query( $args ); ?> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)