Skip to content

Instantly share code, notes, and snippets.

View richardegil's full-sized avatar

Richard Gil richardegil

View GitHub Profile
@richardegil
richardegil / gist:4020564
Created November 5, 2012 21:49
For Carlos
<p><strong>Specialties: </strong>
<?php
global $cpt_onomy;
$terms = get_the_terms( $post->ID, 'specialties' );
echo "<pre>";
print_r($terms);
@richardegil
richardegil / gist:3912552
Created October 18, 2012 15:25
For Hische
$args = array (
'post_type' => 'studentawards',
'tax_query' => array(
array(
'taxonomy' => 'year',
'field' => 'slug',
'terms' => '1994'
)
)
);
@richardegil
richardegil / gist:3908101
Created October 17, 2012 20:52
attachments
Array
(
[0] => stdClass Object
(
[ID] => 14
[post_author] => 21
[post_date] => 2012-10-17 16:29:48
[post_date_gmt] => 2012-10-17 16:29:48
[post_content] => This is the description for the second slide.
[post_title] => Slide 2
if ($attachments) {
$i = 1;
foreach ($attachments as $attachment) {
echo '<a href="#myCarousel" data-to="' . $i . '" class="carousel-nav-item">' . $i .'</a>';
$i++;
}
}
@richardegil
richardegil / gist:3739976
Created September 17, 2012 21:43
Alternative Method
*** How to use
<?php echo open_ext("https://med.uth.edu/utms-universal/utms-superinclude-topnav.php"); ?>
*** What you include in your functions.php file
function open_ext($url){
$url = $url;
$content = wp_remote_fopen($url);
if ($content<>'') {
return $content;
} else {
@richardegil
richardegil / gist:3136416
Created July 18, 2012 14:10
Accordion for Tamara
<div id="accordion">
<a class="toggler">
Learn More
</a><!--end .toggler-->
<div class="element">
<p>This is some text.</p>
</div><!--end .element-->
</div><!--end #accordion-->
// Update to css