I'm hosting my blog in SquareSpace, and I need to add a <Script> tag at the footer of every post.
In the middle of this <Script> tag, I need to replace a value with the permalink for the current post.
So, in my home page, where I'm showing 5 posts, I need this <Script> to show up 5 times, each time with the permalink of the corresponding post inside it.
In wordpress, I can directly edit the HTML of posts, and I can do:
<script type="text/javascript">
var myVar = "<?php the_permalink() ?>";
... more code ...
</script>
How can I do this with SquareSpace?
I haven't found anywhere to edit the templates directly.
Thanks!
Daniel
I'm not exactly sure what you want to do or how to do it in Squarespace but here are a couple tips / resources:
If you login and go to your blog page, then switch to 'Structure Editing Mode' by clicking the cubes icon at the top right of the screen, you can then access the 'Configure this page' button for the blog page. In the configuration settings for the blog you can add the Permalink button to the bottom of every post.
If you login and go to 'Website Configuration' at the top left, then go to 'Website Settings > Code Injection' you can select different areas to edit. You might be able to do what you need here. You may need to upgrade your account to access the particular Code Injection Point you want to edit.
Another option is to just use the code injection point (no account upgrade needed) to apply the script in some way.
A great Squarespace resource is the Developers Forum at http://developers.squarespace.com
I hope this helps!!
Related
I've recently deployed my website infortion. On the home page, I've used the django pagination so that users can see more content.
Few days ago I connected the site to webmasters & it's showing an error Duplicate title tags in the HTML improvements section.
Problem is coming from the home page because pagination is taking the users to next page but still keeping the same title. Which means these two pages,
/
/?page=2
will have the same title.
How can we solve this problem? Thank You.
Add a place for a title in your template and override that when passing it your context in the view.
I have an ecommerce website. I have a help desk website hosted on another domain.
So what I want is to have an URL like this: "http://www.example.com/help" and it will take my customers to my help desk site which is hosted on another domain, let's say http://www.example2.com.
So when someone enters http://www.example.com/help" into their browser's address bar, they are taken to http://www.example2.com"
I think it should be fairly easy to achieve. Please point me in the correct direction.
Somewhere in the HTML of the web page you can paste a link like:
Here you put text you want your customer to see
If you want to redirect the customer to another URL, that question has been asked and answered here: Redirect from an HTML page
If you are using php for http://example.com/help page than you can simple paste following snippet to your help page
<?php header("Location: http://example2.com") ?>
this will redirect your user to example2.com directly!!
or you can use jquery in case you are not using php!!
<script>
$(document).ready(function(){
window.location = "http://example2.com";
});
</script>
Don't forget to add jquery library on header to get jquery working correctly,
hope this helps,
thanks.
I have searched for this a hundred times and only found how to add such tags in Blogger. I have not found a tutorial on how to remove those tags if they are added automatically by Blogger / Blogspot.
In my head area of one of my Blogspot blogs using a custom domain, the tag is added automatically as:
<link href='MY_GOOGLE_PLUS_URL' rel='publisher'/>
I try to remove it, but I cannot find the code anywhere in the template. I used the same template code (copy/pasted xml) in some other blog created by the same Google account. The code does not show there.
I have one more custom domain hosted at Blogger but it does not show the publisher tag automatically.
What am I missing?
After a day of messing around I'm answering my own question.
Turns out if we create a blogger blog (with a custom domain in my case) and add that blogger blog to the list of contributed blog in our Google Plus, rel=publisher of that Google Plus id is automatically added. Once I removed the link from my Google Plus, the code in the header:
<link href='MY_GOOGLE_PLUS_URL' rel='publisher'/>
Dissappears !!
just delete
<span class='meta_autor'>
Publisher: <a expr:href='data:post.authorProfileUrl'>
<data:post.author/>
</a><span class='meta_date'> - <data:post.timestamp/></span></span>
In your template search for
<b:include data='blog' name='all-head-content'/>
code. After finding this code remove it then save. Now check your rel="publisher"
tag gone from your theme.
What if one would want to create a landing page/home page for opencart?
How does someone will supposed to do that?
A landing page or home page, using only opencart and no other means.
--
Clarification.
What I meant of Home Page is it's literal meaning in the context of Front-End WebDev. What I meant to say is, the page where user is redirected when they access my site's root domain.
I want to design and create a custom landing and home page. That landing page has no product content.
It shall only contain the folowing;
Main Navigation Menu with, Home, Online Shop, Blog links.
Site Name, Site Logo
Site Name with Tagline.
Banner Rotator with CTA button.
Footer, Footer Links to Privacy Policy, About Us and other common footer links.
This Home Page/Landing Page/Index Page, is a different page from the main store section. On this page, It has a home page link and a store page link. So on the main nav of this page, you shall see a Home link and a Store link. Clicking store link, shall take you to the main store section and the main nav shall show the categories, the store has.
To achieve what You are requesting:
It shall only contain the folowing:
1. Main Navigation Menu with, Home, Online Shop, Blog links.
2. Site Name, Site Logo
3. Site Name with Tagline.
4. Banner Rotator with CTA button.
5. Footer, Footer Links to Privacy Policy, About Us and other common footer links.
You would have to disable any module that is displaying on homepage (categories, featured, bestsellers, latest, specials, etc.) and enable only the carousel module (or install one of Your desire) and place it on the Content Top position.
In that case You would have these elements:
header (with site name, logo, main navigation)
Your desired carousel/banner rotator
footer (with additional links)
Is that what You are requesting?
Edit 1: I think the homepage You request is kinda nonsense... Why on earth You would like to have a homepage with a link to homepage and store? I would understand to have a website (presentation) with a blog and store that both run within u subdirectory, thus having a site www.site.com, with a blog at www.site.com/blog/ and a store at www.site.com/store/. In that case I would understand that within the main site (www.site.com) You would have a homepage with link to /blog/ and to /store/.
BUT if You are running only a store at Your domain (www.site.com) then having additional homepage is nonsense, as You could create a homepage described above (header + text and carousel as content + footer)...
Edit 2:
Yes, that's my main idea mydomain.com would be my landing page/index page/home page. mytdomain.com/store, is the store section and also with the blog section at mydomain.com/blog.
In that case You could create just a simple static HTML page that will contain static text and a javascript carousel (banner rotator/slider). After You have installed the blog and store to their subdirectories then just create a link to both of them within Your static homepage that lays in the root of the web folder and is called index.html.
Another way how to achieve this with slightly more effort is to have the desired blogging system installed in the root, editing it's homepage while having the main blog on a subpage and a store within a subdirectory. Many people run wordpress/drupal installation at www.site.com and an OpenCart installation at www.site.com/store/. Within a wordpress site You can then have a subpage /blog/ where You will post all of Your blog posts...
So is this the final solution?
The reason why someone would want to do that is for marketing purposes. Creating unique content is extremely important for SEO. The opencart default page does not have much area for landing pages or gateway pages. You may have to improvise to achieve this.
What I would recommend is just create your landing page and then use .htaccess file in /public_html folder to use whatever page you created, inside the landing page code use href links that take you to the products. This would be your best bet.
I wanted to add a +1 button on every post in my website. How do I do that? Any resources? I am also looking for Twitter's Tweet and Facebook's Like. Or Django does not handle that?
Check out the documents for Google Plus, it looks pretty straight forward:
The simplest way to include a +1 button on your page is by just
including the necessary JavaScript and adding a +1 button tag:
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone></g:plusone>