Add the title attribute to links

Turns out you are not the only one: https://core.trac.wordpress.org/ticket/32095 It looks like this was removed in a recent update (4.2) and I can see why they did it. User interface can be confusing at times. You can read more about the removal here: http://wptavern.com/how-to-restore-the-link-title-attribute-removed-in-wordpress-4-2 There is a WordPress plugin, however, that seems to add it … Read more

Run str_replace on title and save the output to a custom field

the_title_rss() outputs its value straight away so it can’t be used in a function like that, you would have to use get_the_title_rss() Or alternatively the_title_rss() has a filter we can hook in to and return your shortened title is possible. (You would add this to your functions.php) function gg_short_title_rss($title) { // This can return false, … Read more

Function extending with if query in functions.php

may be it’s clearer like this : add_filter(‘wpseo_set_title’, function ($title) { if (is_single()) { $page_comment = get_query_var(‘cpage’); if ($page_comment > 3) { $title = “Kontroverse Diskussionen zu: $page_comment $title”; } elseif ($page_comment > 0) { $title = “Meinungen zu: $page_comment $title”; } } return $title; });

Reduce size of responsive title

You can add custom CSS where you use media query in order to reduce the font-size of the title in small devices. You also have some styling that remove the line break and add the 3 dots at the end. So you can also remove them. You can try this code : @media all and … Read more

Remove tagline from the HTML on the home page without plugin?

If first check in your header.php file and check in title tag what is print. if in title tag bloginfo then it’s replace with wp_title(”) because bloginfo is not replace with code. Header.php <title><?php wp_title(”); ?></title> After function.php file put this code: function wpdocs_theme_name_wp_title( $title, $sep ) { if ( is_feed() ) { return $title; … Read more

Permalink and ACF field

You’ll need to use some different functions for obtaining the post thumbnail and title from outside of the loop: get_the_title( $post_id ) – https://developer.wordpress.org/reference/functions/get_the_title/ and get_the_post_thumbnail( $post_id, ‘post_cover’ ) – https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/ Note: These functions only return the title and post thumbnail so will need to be echoed out.

How To capitalize The First Letter Of Every Word In The Post Title

The code below was assembled of different pieces I’ve found around and it was not tested. Consider it as an idea only. <?php add_filter( ‘the_title’, ‘my_capitalize_title’, 10, 2 ); function my_capitalize_title( $title, $id ) { // get separate words $words = preg_split( ‘/[^\w]*([\s]+[^\w]*|$)/’, $title, NULL, PREG_SPLIT_NO_EMPTY ); $stop_words = array( ‘the’, // ‘a’, ‘and’, ‘of’, … Read more