Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 28th, 2015, 07:01 AM
brentwilliamz brentwilliamz is offline
 
Join Date: Dec 2014
Posts: 38
Default Order of inserted code in theme's header.php

Store ID: 46971
Website URL: Androids.net.au

As directed below, I've removed your code from Simple Search Widget module & pasted it into my Graphene's child theme header.php (so it doesn't get overwritten when parent theme is updated):

Code:
<script type="text/javascript">
<!--
/*
 * NOTE: This JS code would be much better off
 * existing in your theme's header.php file.
*/
function wash( anInput ) { if(anInput.value == anInput.defaultValue) anInput.value = ''; }
function checkWash( anInput ) { if(anInput.value == '') anInput.value = anInput.defaultValue; }
//-->
</script>
Is there any particular placement of for your code in the header.php file, eg. start or end of file? Or is this never critical?
  #2  
Old January 28th, 2015, 09:46 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

It shouldn't matter at all just as long as it's placed somewhere between the <head> and </head> tags.

Eric
  #3  
Old January 29th, 2015, 08:42 AM
brentwilliamz brentwilliamz is offline
 
Join Date: Dec 2014
Posts: 38
Default

Good, Eric, didn't think so. Have done as instructed, ta.

What about code pasted into a Store's Custom CSS sometimes I've seen it specified "at very end of file"?

PHP versus CSS: Are they 2 different kettles of fish in how they operate or are read & acted on?
  #4  
Old January 29th, 2015, 10:29 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Code pasted into your Custom CSS should always be pasted at the bottom of the textarea where you paste it into unless otherwise noted.

PHP & CSS are completely different. More like PHP is the brains of the fish and CSS is the color and shape of the fish.
  #5  
Old January 31st, 2015, 01:11 AM
brentwilliamz brentwilliamz is offline
 
Join Date: Dec 2014
Posts: 38
Default

Ahhhh, much clearer now. Ta.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Store plugin effecting theme header johnlawson Problems 3 February 9th, 2012 02:25 PM


All times are GMT -5. The time now is 11:27 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.