Jump to content

I'd like to take off the date in the FOUNDRY blog posts and replace it with the first CATEGORY of the post. Is that possible?

Recommended Posts

The best way to do this would be in developer mode so that you can actually edit the template.

Here is a hacky way to do it with jQuery:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
	$('.entry').each(function(){
       date = $(this).find(".date-wrapper").html();
       category = $(this).find(".blog-categories").html(); 
       $(this).find(".date-highlight").html(category);
       $(this).find(".blog-categories").html(date);
    });
});
</script>

You would also need to update the CSS to make it look right.

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.