This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set up WP install with base plugins | |
# Usage: wpbase <dirname> | |
# Assumes you're in your home directory and installing into ~/DIRNAME | |
dir=$1 | |
# Install latest WP | |
cd ~/$dir | |
wget http://wordpress.org/latest.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<div> | |
<label class="screen-reader-text" for="s"><?php _x( 'Search for:', 'label' ); ?></label> | |
<input type="text" value="<?php echo get_search_query(); ?>" name="s" id="s" /> | |
<input type="submit" id="searchsubmit" value="<?php echo esc_attr_x( 'Search', 'submit button' ); ?>" /> | |
</div> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// [desktoponly] shortcode | |
add_shortcode('desktoponly', 'shailan_desktop_only_shortcode'); | |
function shailan_desktop_only_shortcode($atts, $content = null){ | |
if( !wp_is_mobile() ){ | |
return wpautop( do_shortcode( $content ) ); | |
} else { | |
return null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// woo-remove-billing.php | metinsaylan | 2015-03-15 | |
// This filter removes billing fields from woocommerce checkout page. | |
// Usage: | |
// You can include this file in your functions.php file, | |
// or you can copy and paste this filter to your functions.php file. | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
function custom_override_checkout_fields( $fields ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This template can be included in your single.php template to display <Previous-Next> links below your post. | |
// It uses aligned pager template stated here > http://getbootstrap.com/components/#aligned-links | |
?> | |
<nav> | |
<ul class="pager"> | |
<?php | |
$post_permalink = get_permalink(); | |
$previous_post = get_permalink(get_adjacent_post(false,'',false)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a { | |
color: #3BA0B7; | |
} | |
mark, ins { | |
background: transparent; | |
} | |
.site-header, .featured-page .more-link, .grid .more-link, button, input[type="button"], input[type="reset"], input[type="submit"] { | |
background: #3BA0B7; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body, html { overflow-y: auto; } | |
body.home.page main#main { display: none; } | |
body:before { display: none } | |
#colophon{ display: none } | |
article.hentry { | |
box-shadow: rgba(0,0,0,0.5) 0 2px 7px; | |
} | |
#secondary .nav-menu li { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Shared Function RotateTable(dt As DataTable) As DataTable | |
Dim dt2 As New DataTable() | |
For i As Integer = 0 To dt.Rows.Count | |
dt2.Columns.Add() | |
Next | |
For i As Integer = 0 To dt.Columns.Count - 1 | |
dt2.Rows.Add() | |
dt2.Rows(i)(0) = dt.Columns(i).ColumnName | |
Next | |
For i As Integer = 0 To dt.Columns.Count - 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Shared Function ConvertDataTableToHTML(ByVal dt As DataTable, Attributes As String, Optional IncludeHeaders As Boolean = True) As String | |
Dim TableStart As String = "<table " & Attributes & ">" | |
Dim TableHeader As String = | |
<thead> | |
<tr> | |
<%= | |
From col As DataColumn In dt.Columns.Cast(Of DataColumn)() | |
Select <th><%= col.ColumnName %></th> | |
%> | |
</tr> |
OlderNewer