Support » Fixing WordPress » How To Italicize Book Name in Post Title?

  • Resolved TheRiz

    (@theriz)


    Hello,

    I would like to italicize the name of a book in a post title, but not the rest of the words. Is this possible? I tried using tags such as em /em But that did not seem to work.

    Thanks

Viewing 15 replies - 1 through 15 (of 16 total)
  • You can italicize a word by wrapping it in an <em></em> tag.

    Example:
    <p><em>This is all italic</em>, but this is not.</p>

    I tried this, but it does not work for post titles directly in the title editor. Or, it just doesn’t show up in the preview screen, as I have not published the post.

    I just set up a test site running twenty fourteen and it worked to italicize one word for me.

    Are you an admin user?

    Yes, I am the only user on the site. Could this be theme related? In my post title I put

    Review: Name of Book by Author. I just published the post and the title is not in italics.

    Update: It DOES work on the category page, but NOT on the actual post page. Very strange…

    What is the URL – could be a CSS issue possibly?

    hmmm. Maybe it has been disabled inside of your theme post title.

    What theme are you using?

    Are you able to edit the .php files yourself?

    If so, Can you check how the titles are being displayed on the single.php template?

    Checking out the source-code its Stargazer (http://wordpress.org/themes/stargazer) – I would suggest the same as Evan to see if you can edit the single.php file.

    Going to download and set up a test install on localhost to verify this doesn’t work.

    If all else fails, the author Justin Tadlock is an extremely helpful and responsive developer.

    Ineed, I created a ‘Post’ and entered an italicized title and it comes up normal.

    Let me take a look into the template files.

    Great, thanks for the support guys. I’ll drop Justin a line to see if he can address it, unless you think there might be a quick fix.

    I’m not sure why its not printing out as italic. The index.php (homepage) and single.php are using the same code to display the title on the page.

    The code it’s using is:

    <h1 <?php hybrid_attr( 'entry-title' ); ?>><?php single_post_title(); ?></h1>

    Now, I went into content.php and changed:
    <?php single_post_title(); ?>
    over to
    <?php the_title(); ?>
    which seems to have resolved the problem.

    But when stargazer gets an update this is going to revert.

    Thanks Evan, I’ll shoot Justin a message.

    There is always the option of creating custom child theme and only updating the single.php file. A little more in-depth but ensures any updates to the theme won’t overwrite it.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘How To Italicize Book Name in Post Title?’ is closed to new replies.