Skip to content

Instantly share code, notes, and snippets.

Matt Vaden matt-vaden

Block or report user

Report or block matt-vaden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matt-vaden
matt-vaden / gist:bed2aad4c423aa69e8caad6e6a9623ad
Created Mar 19, 2017
Example PHP Loop Using Switch and Case
View gist:bed2aad4c423aa69e8caad6e6a9623ad
// Load Testimonials script for specific pages
add_action( 'pre_get_posts', 'mv_show_testimonials_script' );
function mv_show_testimonials_script() {
if ( is_page('services') || is_home() || is_front_page() ) {
// Let's set some server vars
if(strpos($_SERVER['REQUEST_URI'], 'staging1') !== false) {
$mv_server = 'stage_one';
} elseif (strpos($_SERVER['REQUEST_URI'], 'staging2') !== false) {
$mv_server = 'stage_two';
@matt-vaden
matt-vaden / CSS-Modify Genesis 2.0 Comment Box
Created Feb 15, 2014
Modifying the Genesis 2.0 Comment Box
View CSS-Modify Genesis 2.0 Comment Box
/* Comment Form Stuff */
#respond .comment-policy-box { border:1px solid #ddd; border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;
margin:30px auto 30px auto; padding:10px 10px 0 10px;
}
#respond p.comment-policy {margin:0; padding:3px 3px 10px 3px;}
#respond p.form-submit {margin:10px 0 10px 0;}
#respond .commentauthorinput,
#respond .commentemailinput,
#respond .commenttextinput { font-family: Georgia, serif; font-size: 14px; font-style: italic; color: #949494; }
#respond input[type="submit"] {padding:20px !important;}
@matt-vaden
matt-vaden / PHP-Modify Genesis 2.0 Comment Box
Last active Aug 29, 2015
Modifying the Genesis 2.0 Comment Box
View PHP-Modify Genesis 2.0 Comment Box
/**
* Customize The Comment Form
* @author Matt Vaden
* link http://www.mattsaffiliatejourney.com/
**/
add_filter( 'comment_form_defaults', 'maj_custom_comment_form' );
function maj_custom_comment_form($fields) {
$fields['comment_notes_before'] = '<div class="comment-policy-box">' .
'<p class="comment-policy">' .
'I\'m very glad you have chosen to leave a comment on my humble site. Please keep in mind that all comments are moderated according to my <a href="/comment-policy/" title="Matt\'s Affiliate Journey - Official Commenting Policy">official commenting policy</a>. Please Do NOT use keywords in the name field because they won\'t be linked to anything anyway...just use your real name. Let\'s try to have a personal and meaningful conversation.' .
You can’t perform that action at this time.