Skip to content

Instantly share code, notes, and snippets.

View richardegil's full-sized avatar

Richard Gil richardegil

View GitHub Profile
@richardegil
richardegil / gist:4686301
Created January 31, 2013 20:49
htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
//sets definittions for base folder
define( 'TEMPLATE_URI', get_template_directory() );
define( 'TEMPLATE_INCLUDES', get_template_directory(). '/includes' );
//sets definititions for current theme folder
define( 'HOME_URI', home_url() );
define( 'THEME_URI', get_stylesheet_directory() );
define( 'THEME_INCLUDE', THEME_URI . '/includes' );
define( 'THEME_IMAGES', THEME_URI . '/images' );
define( 'THEME_CSS', THEME_URI . '/css' );
<!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
@richardegil
richardegil / gist:4542144
Created January 15, 2013 21:17
for carlos
.row-fluid .container .row{
margin-left: 0;
}
@richardegil
richardegil / gist:4216439
Created December 5, 2012 15:16
my array
Array
(
[0] => Array
(
[myid] => 31
[fname] => Dwayne
[mi] =>
[lname] => Alexander
[degrees] => PHD
)
@richardegil
richardegil / gist:4208087
Created December 4, 2012 20:01
Alpha names
// part 1
<?php
// needed to access data from cpt-onomies
global $cpt_onomy;
// grabs the current taxonomy data being used by this page.
$current_taxonomy = $wp_query->queried_object;
@richardegil
richardegil / gist:4119147
Created November 20, 2012 16:43
For Carlos - CPT additions
Carlos,
I added a third array to the initial setup of the Faculty cpt.
The file you need to edit is: /includes/cpt/faculty.php
$faculty = register_cuztom_post_type(
'faculty',
array(
'has_archive' => false,
'supports' => array ('title', 'excerpt', 'thumbnail'),
@richardegil
richardegil / gist:4090942
Created November 16, 2012 21:10
Carlos - Middle Name
// Middle Initial
<?php if ($middle_intial != '')) {
echo '<h3>' . $first_name . ' ' . $middle_initial . '. ' . $last_name . ', ' . $the_titles . '</h3>';
} else {
echo '<h3>' . $first_name . ' ' . $last_name . ', ' . $the_titles . '</h3>';
}
@richardegil
richardegil / gist:4042340
Created November 8, 2012 22:44
for tamara
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox();
$(".fancybox1")
.attr('rel', 'gallery')
.fancybox();
$(".fancybox").fancybox({
helpers : {
title: {
@richardegil
richardegil / gist:4033104
Created November 7, 2012 17:32
for subi
<ul>
<?php $temp_query = $wp_query; query_posts("showposts=10&cat=-1000"); ?>
<?php while (have_posts()) { the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to &ldquo;<?php the_title(); ?>&rdquo;"><?php the_title(); ?></a></li>
<?php } $wp_query = $temp_query; ?>
</ul>