WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have found some nice True-Type fonts on the web, and I would like to use them for specific roles in a specific theme of my WP blog (e.g., H2 or post titles).

How do I change the theme to use the fonts for these roles?

share|improve this question

closed as off topic by Wyck, toscho Jul 25 '12 at 17:12

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

One, you could edit all the instances of the title in the theme files. You can use current_user_can to differentiate between roles. WP Codex

You may also be able to use a filter instead of having to edit all the theme files.

add_filter( 'the_title', 'wpse40503_changetitlefontonrole');
function wpse40503_changetitlefontonrole($title) {
  if(current_user_can('change this to your role')) {
    if( $title == $post->post_title and !is_page() ) {
      $title = '<span class="specificrolefont">'.$title.'</span>';
  return $title;

And then do not forget to add CSS styles for the font.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.