WordPress.org

Forums

[resolved] How To Italicize Book Name in Post Title? (17 posts)

  1. TheRiz
    Member
    Posted 1 year ago #

    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

  2. Evan Herman
    Member
    Posted 1 year ago #

    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>

  3. TheRiz
    Member
    Posted 1 year ago #

    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.

  4. Evan Herman
    Member
    Posted 1 year ago #

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

    Are you an admin user?

  5. TheRiz
    Member
    Posted 1 year ago #

    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...

  6. Nathan Driver
    Member
    Posted 1 year ago #

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

  7. TheRiz
    Member
    Posted 1 year ago #

  8. Evan Herman
    Member
    Posted 1 year ago #

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

    What theme are you using?

  9. Evan Herman
    Member
    Posted 1 year ago #

    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?

  10. Nathan Driver
    Member
    Posted 1 year ago #

    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.

  11. Evan Herman
    Member
    Posted 1 year ago #

    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.

  12. Evan Herman
    Member
    Posted 1 year ago #

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

    Let me take a look into the template files.

  13. TheRiz
    Member
    Posted 1 year ago #

    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.

  14. Evan Herman
    Member
    Posted 1 year ago #

    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.

  15. TheRiz
    Member
    Posted 1 year ago #

    Thanks Evan, I'll shoot Justin a message.

  16. Nathan Driver
    Member
    Posted 1 year ago #

    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.

  17. Evan Herman
    Member
    Posted 1 year ago #

    Nathan is right, you could always go that route to avoid the revert on update which would be ideal.

Topic Closed

This topic has been closed to new replies.

About this Topic