Jump to content

One word in italics in blog post title

Go to solution Solved by tuanphan,

Recommended Posts

  • Solution
On 2/2/2023 at 10:07 PM, kellyetz said:

Yes absolutely!  Here's a link: https://the-zhuzh.squarespace.com/journal/cocktail-recipes

The site is on a trial right now, but will be business plan - thank you!

First, edit Blog Post Title from this

THE ART of a GOOD COCKTAIL

to this

THE ART of a <em>GOOD</em> COCKTAIL

If this doesn't work, keep em tag then add this to Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $(".blog-item-wrapper .blog-item-title h1.entry-title").each(function(){
    $(this).html($(this).text());
  });
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
  • 1 month later...
On 4/3/2023 at 10:26 PM, kellyetz said:

Hey @tuanphan

One question about this, it looks like when I use this to create italics, it disables the links to the blog posts in summary blocks - is there a way to prevent that? 

 

Thank you so much for your help! 

Can you share link to page where you use summary?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 4/19/2023 at 7:49 AM, kellyetz said:

@tuanphan 

- ah yes, sorry about that! I realized the Lazy Summaries plugin I use allows the summary block to be wrapped in a link, so that fixed the problem there, but it does remove the link from the blog post title in the main grid (see link below): 

https://carolyn-celia.squarespace.com/blog
password: demo 

Try this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $(".blog-item-wrapper .blog-item-title h1.entry-title a").each(function(){
    $(this).html($(this).text());
  });
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
  • 2 months later...
On 7/19/2023 at 1:31 AM, springerdesign said:

I tried your solution with the code injection in the footer, but the code still appears in the title (I removed it for now). Here is the post:

https://www.reichmanjorgensen.com/news-events/estremera-lawdragon500-2023

That code for SS 7.1, your site is 7.0. Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("h1.BlogItem-title").each(function(){
    $(this).html($(this).text());
  });
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 months later...
On 10/11/2023 at 10:19 PM, Sophie_T said:

Hello. I have tried this too and it works on the individual blog post but not on the blog grid overview?

Yes. Blog grid has a different id, can you share link to blog grid? We can check and adjust code easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 10/13/2023 at 2:48 PM, Sophie_T said:

Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("h1.BlogItem-title, h1.blog-title").each(function(){
    $(this).html($(this).text());
  });
});
</script>

image.thumb.png.923bbd148bac5ca44b1ef5124f29e50f.png

Note: your <em> tag may appear on Google Search Results

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.