Theme Checker Text Domain

_x() is for string with a context. So your second argument is just the context, and there is no text domain. Suggestion: $string = _x( ‘%1$s %2$s – %3$s %4$s’, # string to translate ‘recent comments 1 = gravatar, 2 = … ‘, # context for translators ‘thst’ # text domain ); $visible = sprintf( … Read more

Theme Functions run a function upon activation or preview

Try if ( isset($_GET[‘activated’]) && $_GET[‘activated’] == ‘true’ || isset($_GET[‘preview’]) && $_GET[‘preview’] == 1 ) instead of if ( $_GET[‘activated’] == ‘true’ || $_GET[‘preview’] == 1 ) Edit: You should wrap the if-sentence in the functions.php file into a function and a relevant hook. Here is an example using the after_theme_setup hook: add_action(‘after_theme_setup’,’my_theme_setup’); function my_theme_setup(){ … Read more

Override methods in Yoast SEO breadcrumb class

In cases like this, open the plugin files in a good code editor and search for the elements you need, as there may be an useful hook. So, for this we have the filter wpseo_breadcrumb_single_link. Maybe you can replace span for li in $link_output, or use $link to build your own: add_filter( ‘wpseo_breadcrumb_single_link’, ‘filter_breadcrumb_wpse_88254’, 10, … Read more

How to differentiate the homepage structure from the category page structure in WordPress template?

If I understand you… Your theme may only have an index.php and a single.php but WordPress supports a much more complicated templating system, and you can control the formatting of different types of content just by creating files with the right names. In your case, I think that at least one of the files you … Read more