Skip to content

Instantly share code, notes, and snippets.

@omurphy27
omurphy27 / Wordpress PHP Shorten the_title.php
Created February 27, 2013 04:20
Wordpress PHP Shorten the_title
<?php
// Shorten the Wordpress Title
// how to shorten the title in wordpress
echo substr(the_title('', '', FALSE), 0, 40);
// check here for more info: http://wordpress.org/support/topic/how-to-limit-character-on-title
// This is how i shorten the title and make sure to append '...' on the end of it:
@omurphy27
omurphy27 / target two elements with click.js
Created March 4, 2013 04:36
JQUERY - Target Two Elements Simultaneously with Click
// http://stackoverflow.com/questions/1313373/jquery-same-click-event-for-multiple-elements
$('.class1, .class2').click(some_function);
$('.class1').add('.class2').click(some_function);
@omurphy27
omurphy27 / wordpress defining page template name.php
Created March 4, 2013 22:24
Wordpress Defining Page Template Name
<?php
/*
Template Name: Page Template Name
*/
?>
@omurphy27
omurphy27 / accordian-arrow.css
Created March 5, 2013 04:31
CSS Accordian Arrow Hover Effect
/* the following CSS, particularly the span stuff creates the accordian arrow effect */
/* can use the same arrow image and just css3 rotate it */
.st-accordion ul li > a{
font-family: 'Josefin Slab',Georgia, serif;
text-shadow: 1px 1px 1px #fff;
font-size: 46px;
display: block;
position: relative;
@omurphy27
omurphy27 / google analytics tracking code .html
Created March 5, 2013 19:55
HTML Javascript Google Analytics Tracking Code
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11253259-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
@omurphy27
omurphy27 / CSS Wordpress IE Specific Stylesheet link for header.php
Created March 7, 2013 23:58
CSS Wordpress IE Specific Stylesheet link for header.php
@omurphy27
omurphy27 / HTML PHP Wordpress Google Plus Social Meta Guidelines.html
Created March 12, 2013 17:57
HTML PHP Wordpress Google Plus Social Meta Guidelines
<!-- Google Plus Social Meta Guidelines
Add the following in the <head> section with the other metas
-->
<meta itemprop="name" content="Team Carver">
<meta itemprop="description" content="Team Carver has a long history of helping people achieve their real estate goals. Let us put our expertise of the local real estate market to work for you.">
<meta itemprop="image" content="http://www.teamcarver.com/wp-content/uploads/2012/12/social-profile-pic.jpg">
<!-- For images, 200px x 200px are the ideal dimensions
@omurphy27
omurphy27 / Styling Logo and hiding logo text.css
Created March 13, 2013 04:04
HTML CSS Styling Logo Image and Hiding Logo Text
/*Here's the html for the logo
<div class="header">
<h1 class="logo" ><a href="" >Magazine</a></h1>
</div>
Here's the CSS for the Logo*/
.header h1.logo { margin: 7px 0 0 0; float: left; }
@omurphy27
omurphy27 / 301 redirect .htaccess
Created March 14, 2013 21:33
HTACCESS 301 redirect
Redirect 301 /services/probate http://www.drizinlaw.com/services/las-vegas-probate-attorney
@omurphy27
omurphy27 / text shadow css codrops.css
Created March 14, 2013 22:29
CSS Cool Text-shadow effect from Codrops
/* Cool Text Shadow Effect stolen from Codrops: http://tympanus.net/codrops/ */
.ct-featured h2 {
color: #282828;
text-shadow: 1px 1px 0px #f2f2f2, 1px 2px 0px #b1b1b2;
text-decoration: none;
}