add_theme_support( ‘title-tag’ ) in conflict with custom titles function

Your problem is that you can not use wp_title() in the theme if the theme already supports title-tag. The <head> of your theme should look like this: <head> <meta charset=”<?php bloginfo( ‘charset’ ); ?>”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <?php wp_head(); ?> </head> The filter and title-tag support: add_action( ‘after_setup_theme’, ‘theme_functions’ ); function theme_functions() { add_theme_support( … Read more

How to add subscript and superscript in WordPress page titles

You can use markup in titles. H<sub>2</sub>O will work just fine. I would use H₂O with a real ₂ because markup will be stripped in title attributes and in feeds. Note that WordPress will not create a pretty permalink for the correct character. The slug for my example will look like this: h2o-h%e2%82%82o. You need … Read more

order by second word in title?

There is a filter, ‘posts_orderby’, which allows you to specify your own ORDER BY clauses. In your case, the code would look something like this: add_filter( ‘posts_orderby’, ‘order_by_surname’ ); function order_by_surname( $orderby, $query ) { // first you should check to make sure sure you’re only filtering the particular query // you want to hack. … Read more

Problem in wordpress with “-“

Background: WordPress converts normal dash (-) to long dash (–), straight quotes to curly quotes and some other similar symbols and punctuations to their printer friendly versions using wptexturize. Generally it’s recommended to leave them up to WordPress. However, occasionally, we may want to override this behaviour. For example, in case we are writing Programming … Read more

How can I add title attributes to next and previous post link functions?

Update As I deleted the Repo on GitHub, here’s a new answer. add_filter( ‘previous_post_link”https://wordpress.stackexchange.com/questions/13044/,”wpse13044_adjacent_post_link_tooltip’, 10, 2 ); add_filter( ‘next_post_link”https://wordpress.stackexchange.com/questions/13044/,”wpse13044_adjacent_post_link_tooltip’, 10, 2 ); function wpse13044_adjacent_post_link_tooltip( $format, $link ) { $previous=”previous_post_link” === current_filter(); // Get the next/previous post object $post = get_adjacent_post( false ,” ,$previous ); // Copypasta from cores `get_adjacent_post_link()` fn ” === $title = get_the_title( … Read more

Two title tags in my header

The two title tags can be explained as that you are using a theme that is written for WordPress4.1 and actually is using 4.1. As from 4.1 you don’t need to call wp_title() in the head any more, you can make use of new title_tag theme support tag which automatically adds the wp_title() tag in … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduseduedusedueduseduseduedusedus