Skip to content

Instantly share code, notes, and snippets.

View vfontjr's full-sized avatar

Victor M. Font Jr. vfontjr

View GitHub Profile
<?php
add_filter( 'simple_social_default_profiles', 'my_custom_simple_social_default_profiles' );
function my_custom_simple_social_default_profiles() {
$glyphs = array(
'bloglovin' => '&#xe60c;',
'dribbble' => '&#xe602;',
'email' => '&#xe60d;',
'facebook' => '&#xe606;',
'flickr' => '&#xe609;',
<?php
function vmf_query_filter($query) {
if ( ! is_admin() && $query->is_main_query() && $query->is_home() ) {
$query->set( 'post_type', array('post', 'page', 'portfolio', 'product') );
};
return $query;
};
add_filter('pre_get_posts', 'vmf_query_filter');
<?php
//* Add accessibility support
add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) );
<?php
function my_custom_header_title( $wp_customize ) {
$wp_customize->get_section( 'header_image' )->title = __( 'Header Logo', 'digital' );
}
add_action( 'customize_register', 'my_custom_header_title')
<div style="height: 331px;" class="image-container">
<img id="image-2290" src="stanton2d_e.jpg" class="attachment-shop_catalog wp-post-image" alt="Stanton2D.jpg" width="332">
</div>
var confirmation_req = $.ajax({
type: 'GET',
url: '//path-to-remote-server',
dataType: "text",
contentType: "text/xml",
data: { FormXml: strXml },
dataFilter: function (data, type) {
var start = data.search('">') + 2, strlen = data.search('</long>') - start;
return data.substr(start, strlen);
}
jQuery(document).ready(function ($) {
"use strict";
function set_form_fields(data) {
$("#html_display_element").html(data);
$("#field_confirm_value").attr("value", data ); // One way to set a value. Could also use $("#field_confirm_value").val( data );
}
$("#btnSubmit").on( "click", function (e) {
e.preventDefault();
<?php
add_action( 'genesis_doctype', 'genesis_do_doctype' );
/**
* Echo the doctype and opening markup.
*
* If you are going to replace the doctype with a custom one, you must remember to include the opening <html> and
* <head> elements too, along with the proper attributes.
*
* It would be beneficial to also include the <meta> tag for content type.
.fa-hidden {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
.genesis-nav-menu > .right {
<?php
add_filter('widget_tag_cloud_args','set_tag_cloud_font_size');
function set_tag_cloud_font_size($args) {
$args['smallest'] = 12; /* Set the smallest size to 12px */
$args['largest'] = 19; /* set the largest size to 19px */
return $args;
}