• Skip to primary navigation
  • Skip to main content
  • Skip to footer

TECHXT

simple extendable solutions

  • Home
  • Wordpress Tutorial
  • SEO
  • How to
  • Forum
  • Knowledge Base
    • Domain Name Generator
    • My Tech Projects
    • News
    • Security
  • About
  • Search

Option to only load scripts on Post pages?|Tweet Like Plusone and Share Plugin|Plugin Support Forum|TECHXT

.

Avatar
sp_LogInOut Log Insp_MemberList Members
Lost password?
sp_Search Search
Advanced Search
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
Home
Plugin Support Forum
Tweet Like Plusone and Share Plugin
Option to only load scripts on Post pages?
Go to Bottom
sp_NewPost Add Reply
sp_NewTopic Add Topic
sp_Feed Topic RSSsp_TopicIcon
Option to only load scripts on Post pages?
August 15, 2011
2:22 pm
Avatar
Dan
Guest
Guests
Go to Top
1sp_Permalink sp_Print sp_QuotePost Quote

I noticed that in v1.2 you added the option to load scripts only if the buttons are visible on the page. I still see the scripts being loaded on non-post pages. What I would like to do is have the scripts load only on the single.php template page. Is this possible?

Did I do something wrong or am I misunderstanding what the update is about?

August 15, 2011
3:46 pm
Avatar
_sudipto_
Admin
Forum Posts: 537
Member Since:
June 22, 2011
sp_UserOfflineSmall Offline
sp_UserWebsite sp_Twitter sp_Facebook
Go to Top
2sp_Permalink sp_Print sp_QuotePost Quote

This is a generic plugin. Meaning it can be used on any circumstance. Thats why I did not add an such options to add conditional scripts based on which page/post is displayed.

If you want to load the scripts only on single post/ page then
search for the below function (line 99)
======================================
function social4i_css() {

change that to
=====================
function social4i_css() {
if(!is_single() && !is_page())return '';

< My Domain Names Generator tool crossed 50,000 page views. If you haven't tried yet, then try it out. />

August 15, 2011
5:35 pm
Avatar
Dan
Guest
Guests
Go to Top
3sp_Permalink sp_Print sp_QuotePost Quote

What was the text in the v1.2 update refer to?

Added option to load script only if the associated button is used on the site. (No more unnecessary loading of scripts)

August 16, 2011
5:41 am
Avatar
_sudipto_
Admin
Forum Posts: 537
Member Since:
June 22, 2011
sp_UserOfflineSmall Offline
sp_UserWebsite sp_Twitter sp_Facebook
Go to Top
4sp_Permalink sp_Print sp_QuotePost Quote

There was an issue with the plugin earlier. All scripts were loaded with your page whether or not you are using the button on your site.

 

Some people have complained about this. Like they were not using the linkedin button but still the scripts were getting loaded. So I added an option which checks whether you are using the button on your site or not and accordingly loads the script.

< My Domain Names Generator tool crossed 50,000 page views. If you haven't tried yet, then try it out. />

sp_NewPost Add Reply
sp_NewTopic Add Topic
Add Reply: Option to only load scripts on Post pages?
Guest name (required):
Guest email (required):

NOTE: new posts are subject to administrator approval before being displayed

Guest URL (required)
Math Required
What is the sum of:
12 + 10
sp_Feed All RSS
Go to top
Forum Timezone: America/New_York
Most Users Ever Online: 177
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Natália Gastão: 10
indy: 6
Milan Berger: 5
Cesar Bielich: 5
YethzART: 4
Aqua Skye: 4
Member Stats:
Guest Posters: 369
Members: 88
Moderators: 0
Admins: 2
Forum Stats:
Groups: 2
Forums: 5
Topics: 384
Posts: 1334
Newest Members:
test usser, Anthony Ang, Fernando Rueda, Jesus S. Jr Matubis, Quinton Williamson, William H Cole
Administrators: Administrator: 4, _sudipto_: 537
© Simple:Press —sp_Information

Footer

Subscribe by email

FOLLOW US :

Tools & Apps

  • Domain Names Generator
  • Our Wordpress Plugins
  • HTML Code Table

TechXT Network

  • www.seecoupons.com – Just another Deals & Coupons site
  • pincodes.techxt.com – A search engine for Indian Pincode.
  • stdcode.techxt.com – A search engine for Indian STD Codes
  • mobileinfo.techxt.com – A search engine for Indian Mobile Codes
  • bankifsccode.techxt.com – A search engine for Indian Bank IFSC Codes.

Info

  • Contact us
  • Privacy Policy

  •   simple extendable solutions

© Copyright 2025 TECHXT.COM

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.