Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9270077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:16:59+00:00 2026-06-18T15:16:59+00:00

I’m using a blog template – squarespace 6, which doesn’t allow me access to

  • 0

I’m using a blog template – squarespace 6, which doesn’t allow me access to the .html / and only limited access to the .css

Each time I create a blog post I add tags and a category to it – but these tags/category are placed at the bottom of the blog post. I’m trying to move them to the sidebar.

The problem is that I have multiple blog posts per page, I’m trying to use jquery to select the .tags and .category classes and move them into the .sidebarbefore the .date with code like this:

$(document).ready(function(){

var $categories = $('div.categories').parent('article');
var $spanDate =('span.date').parent('article');  

$categories.insertBefore($spanDate);

});

(this code is only the example for .categories)

The problem is this code grabs the tags/category from every blog post and applies it to every sidebar so categories and tags are getting mixed up.

I’m trying to get the code to select the .tags and .category of a parent article and then move those to the .sidebar of the same parent article.

I can’t use any specific ID’s because I want this to apply to every blog post – but the tags/category need to stay within that post.

There is a lot of injected code but the basic structure of the HTML is as follows:

<blog>  //Wrapper for the whole blog page
<content>
<article> //Each article is a blog entry
  <section class="main"> //Contains the contents of the blog entry. This also has a dynamically generated ID, 
    //Blog Entry Content Goes Here
    <footer>
      <div class="meta"> //Contains the tags/categories I try to pull out of the DOM
        <span class="tags"></span> //Contains the tags each wrapped in an `<a>`
        <span class="categories"></span> //Contains the category tags
      </div>
    </footer>
   </section>
   <section class="sidebar"> //This is where I'm trying to place the tags/categories
     <span class="date"></span> //I try to place the category before this in the jquery code above
     <more spans....> // I try to place the tags appended onto the end of the sidebar (code not shown above).
   </section>
</article>
<article></article> //More blog entries with same structure
<article></article> //More blog entries with same structure
<article></article> //More blog entries with same structure
</content>
</blog>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:17:00+00:00Added an answer on June 18, 2026 at 3:17 pm

    If I’m understanding you right, this should do:

    $('div.categories').each(function(){
        var $this = $(this);
        var $date = $this.closest("article").find(".date");
    
        $this.insertBefore($date);
    });
    

    The key is that for each .categories I find the related .date rather than all .dates. Also, your code shouldn’t do anything at all with the supplied html. Neither your .categories or your .date has a direct parent of article.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have thousands of HTML files to process using Groovy/Java and I need to
I am using JSon response to parse title,date content and thumbnail images and place
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.