Category - Uncategorized

1
How to add CSS to a single product in Shopify
2
New Zealand Mosque Shooter Manifesto – READ ONLINE
3
The 6 Rules of Success – Arnold Schwarzenegger

How to add CSS to a single product in Shopify

I wanted to hide a specific widget on a single product’s page in my Shopify shop, but I couldn’t find a way to edit the CSS for just a single product.
Sure, I could apply the CSS to all products, but I didn’t want to affect the rest of my store.
Fortunately, there’s a pretty simple way to do it using some liquid code.
If you’re new to liquid, don’t worry I will share the exact bit of code I used. If you’ve ever used twig (the templating language), then you should recognise liquid because it’s pretty similar.

1. Add a product-specific CSS class to the body tag

We need a way to be able to write CSS to just target the HTML on a single product. The best way to do this is to somehow add the product’s ID into a CSS class that we can use later to target the CSS to just that product’s ID.

First, navigate to Sales Channels > Themes, then next to your active theme, select Actions > Edit Code.
Then select the file Layout > theme.liquid.
Within the file’s HTML, look for the line which starts with class=” and before the next .

{%- if product.id -%}product-{{ product.id }}{%- endif -%}

So basically you’re adding the code above into the class=”” section, between the speechmarks and after any other code within the speechmarks. Make sure you add a space before to separate the added code from what’s already there.
So now, the line should look something like this:

<body class="template-{{ template | split: '.' | first }} {%- if product.id -%}product-{{ product.id }}{%- endif -%}">

Save the page.
Now, visit a product page on the frontend of your site. View source code using your browser’s tools (Right click > View Source if you’re using Chrome).
You should see a line that looks like the following:

<body class="template-product product-1849235111987" data-gr-c-s-loaded="true" style="overflow: visible; height: auto;">

Notice the product-1849235111987 class? You can use this to target anything on this specific product page with CSS.

2. Add your CSS

Next, still within the code editor, open the Assets > theme.scss.liquid file. This is your main CSS file (well, SCSS file actually) that contains all of the styling infromation for your store.
At the bottom of the file, add the following line:

body.product-1849235111987{/* Your CSS here */}

Amend this line to include your actual product’s ID number and add in any custom CSS instead of the comment.
You will also probably want to be more specific with the targeting rather than the body tag itself. For example, the following below would change the colour of a buy button for just that single product:

body.product-1849235111987 .product-form__cart-submit{background-colour: #ff0000;}

Hopefully, I’ve explained things well. It may seem tricky at first, but it’s really simple once you understand what’s going on. If you’re already familiar with code, then you’ll probably have no difficulty.
Feel free to ask any questions in the comments and I’d appreciate any advice!

New Zealand Mosque Shooter Manifesto – READ ONLINE

Earlier this month, a truly shocking and saddening event happened in New Zealand. A shooter entered a mosque in Christchurch and opened fire. Before the attack, the shooter released a chilling manifesto – you can read it online here. The PDF document is 74 pages long and is titled The Great Replacement.

New Zealand Shooter

On the morning of Friday 15th March a shooter, named Brenton Tarrant, entered a mosque in Christchurch, New Zealand. He opened fire on the crowd inside using an AR15 assault rifle. Latest reports indicate that there were 49 people killed in total. After the shooting, the shooter drove off in his car, later apprehended by police. He is being charged with murder.

Read the Manifesto Online

The 74-page document was uploaded and shared on 8chan forum prior to the attack. I am yet to fully read the document, but it appears to describe an ‘invasion’ of Europe and the western world by Islam. The shooter was apparently a white nationalist and saw himself as a soldier ‘fighting back’ against mass immigration.

In the manifesto, the self-proclaimed ‘eco-nationalist’ shares his experience of travelling across Europe and seeing the effects of mass immigration. He claims that when he visited France, his despair turned to anger and he sought to fix the issue of multiculturalism and the ‘invasion’ of Europe by islam.

We have managed to source a copy of the manifesto in PDF format, click on the button below to download the document and read it.
 

Read Online

Should there be any issue downloading the file, click here to use a mirror

Live Stream Video

The New Zealand shooter live streamed his attack onto the popular social media website Facebook. As you can imagine, the footage is extremely graphic and it is not recommended viewing by anyone of a sensitive nature. The attacker can be seen pulling up outside of the mosque and leaving his car with his AR15 assault rifle. He then walks into the mosque and opens fire on the people inside.

The video has been removed from most mainstream social media websites and the New Zealand government have taken steps to remove the video from the internet and censor it from the public.

 

 

Copyright © 2018. Created by Hayden Kibble.