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
<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.

@trishasalas
trishasalas / mysql.sh
Created September 25, 2015 18:23
MySql Command Line Snippets
#Count Number of Tables
SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'dbName';
#or
USE databasename; SHOW TABLES; SELECT FOUND_ROWS();
@trishasalas
trishasalas / gist:2794178
Created May 26, 2012 14:42 — forked from pdewouters/gist:2464266
Genesis layouts with SCSS / Susy fluid grid
// Layout ----------------------------------------------------------------------
@include establish-baseline(16px);
#nav,
#inner,
#footer{
@include container;
width:100%;
@include padding-trailer(1);
@trishasalas
trishasalas / bfc-android initial project commit
Created September 14, 2012 00:49
Tulsa Web Devs Code bfc-android
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>bfc-android</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
<?php
// Customizer.php
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function ts_customize_register( $wp_customize ) {
RewriteEngine On
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"
<?php
/*********************************
|||| MAGIC.SCRIPT ||||
|||| XX ||||
|||| ----------------- ||||
|||| for migrating ||||
|||| multisite posts ||||
|||| into a single site ||||
**********************************/