#Tracking Codes A simple list of common tracking codes and where to place them on your website.
Pages
- All
Placement
- Before closing
</head>tag
| <VirtualHost *:80> | |
| ServerName stoydash.localhost | |
| DocumentRoot "c:/wamp64/www/stoydash/" | |
| <Directory "c:/wamp64/www/stoydash/"> | |
| Options +Indexes +Includes +FollowSymLinks +MultiViews | |
| AllowOverride All | |
| Require local | |
| </Directory> | |
| </VirtualHost> |
| /************************************************** | |
| >> Read More Shortcode << | |
| **************************************************/ | |
| jQuery(document).ready(function() { | |
| //Set the content area as a variable | |
| var moreContent = jQuery('.read_more_content'); | |
| //Auto hide the hidden content by default | |
| moreContent.slideUp(); |
| <?php | |
| /***************************************************************** | |
| *** Phone Link With Anayltics Tracking *** | |
| ** Created By: Chris Steurer | |
| ** Date Added: | |
| ** Contact: info@somedomain.com | |
| ** | |
| ** Create clickable phone links that include a tracking |
| <?php | |
| function convert_state_to_abbreviation($state) { | |
| //If there is no text in the $state variable | |
| if($state == '') { | |
| //Exit this function | |
| return false; | |
| } | |
| //Array of state names & abbreviations |
| //Check if packages are installed | |
| dpkg --get-selections | grep [package_name] | |
| //Show a list of files and directories in the current directory. | |
| ls | |
| //Show file permissions | |
| ls -l /avr/www/html/index.php | |
| //Edit a file |
| <?php | |
| function checkForRedirects($URL) { | |
| $ch = curl_init($URL); | |
| curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); | |
| curl_exec($ch); | |
| $original_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); | |
| <?php | |
| function prepare_url($string) { | |
| //Check if the string starts with http or https | |
| if (substr($string, 0, 7) == "http://" OR substr($string, 0, 8) == "https://") { | |
| $url = $string; | |
| } else { | |
| //Remove any presence of http:// or https:// from the link | |
| $string = str_replace("://", "", $string); |
| <?php | |
| /* | |
| The functions below will work in wordpress 4.4 and greater. | |
| These functions allow you to add, get, and update meta data for terms/taxonomies. | |
| */ | |
| /* | |
| *** Add Meta Data To A Term |
| //echo the current filename | |
| echo basename(__FILE__); | |
| //echo current filename without extension | |
| echo basename(__FILE__, '.php'); | |
| //Echo the current URL | |
| echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |