Jump to content

Archived

This topic is now archived and is closed to further replies.

Lisa Haran

styles disappearing from post excerpt

Recommended Posts

Lisa Haran

hi there ,

my site uses dms 2 http://www.secondcaptains.com/

on my post http://www.secondcaptains.com/latest-news/tickets-for-second-captains-live-series-3-show-1/

the italics disappear on the post excerpt, for example on the full post the following is in italics

"The Lyrics Board, Where In The World and Brendan O’Carroll’s Hot Milk and Pepper"

yet the italics disappear on the post excerpt on the homepage.

Any idea why?

Share this post


Link to post
Share on other sites
Danny

Hi,

 

This is because WordPress excerpts remove all HTML formatting. The simplest way to resolve this is for you to write your own excerpt. Go to your post and in the top right hand corner there is a button called Screen Options, click that and then check the Excerpt checkbox. A new section will appear below the Post content editor, called excerpt. In here copy and paste your text from your post and then use the HTML <strong> or <em> to add your styling.

 

For example:

 

Second Captains Live is back for series 3 and we’re determined to continue our undisputed position as the show with the greatest ever live audience in the history of RTE television.
 
Yes, we consider you lot even cooler than the entourages that used to surround the likes of the <em>The Lyrics Board, Where In The World and Brendan O’Carroll’s Hot Milk and Pepper.</em> 

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Lisa Haran

Hi Danny,

Thanks for the response, unfortunately my client will be adding all posts and they are not savvy with html so your suggestion would not work, is there really no simpler work around.

 

Thanks

Share this post


Link to post
Share on other sites
Danny

OK, to resolve this, you're going to need to use a child theme, you're free to use mine here - http://dannyholt.github.io/skeleton/
 
Once you have installed the child theme, make it the default theme and then add the code below to the child themes functions.php.
 
global $ex_tags;
$ex_tags = '<h1>';
 
This allows the H1 tag in the excerpt
 
global $ex_tags;
$ex_tags = '<h1><em><img><i>';

This allows multiple tags in excerpts, add any others you need.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×