Skip to content

Instantly share code, notes, and snippets.

View trishasalas's full-sized avatar

Trisha Salas trishasalas

  • Level Access
  • Tulsa, OK
View GitHub Profile
@trishasalas
trishasalas / bbpress-rss
Created March 27, 2014 20:40
Create a Clickable RSS Link for a bbPress Topic
// Make an RSS Feed Link for a bbPress Topic
// First Create Your Function
function bbpress_rss() {
$url = "http" . (($_SERVER['SERVER_PORT']==443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
echo ' <a href="' . $url . 'feed">Subscribe via RSS</a>';
}
// Then Echo the Function
@trishasalas
trishasalas / index.html
Created March 28, 2014 18:03
A Pen by Trisha Salas.
<div class="wrapper">
<div class="cat animal">
<div class="head">
<span class="nose"></span>
<div class="ears"></div>
<div class="stripes stripes-right"></div>
<div class="stripes stripes-left"></div>
<div class="tongue"></div>
</div>
<div class="body">
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@trishasalas
trishasalas / 0_reuse_code.js
Created June 2, 2014 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@trishasalas
trishasalas / Inconceivable.php
Created July 8, 2014 05:56
A Princess Bride Quote in php.
class That_Word() {
$word = 'what you think the word means';
$that_word = 'what the word really means';
you_using_that_word(){
$word <> $that_word;
}
@trishasalas
trishasalas / skip-links.php
Created October 4, 2014 14:21
Skip Links
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
</header><!-- .entry-header -->
</article><!-- #post-## -->
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
</div>
<!-- taken from header.php in the _s theme -->
@trishasalas
trishasalas / translate-variable.php
Created October 14, 2014 21:38
translate a variable
<?php
$url = get_post_meta( $post->ID, '_project-url', true );
if ($url != '') {
$link = sprintf( __( '%s', 'wpp-portfolio' ), esc_url( $url ) );?>
<p><?php echo $link;?></p>
<?php }
?>

Post Links

Pesky image arrows would stay lined up so I decided to make them with just css. Added some hover animation just for fun!

A Pen by Trisha Salas on CodePen.

License.