Skip to content

Instantly share code, notes, and snippets.

View vfontjr's full-sized avatar

Victor M. Font Jr. vfontjr

View GitHub Profile
<?php
class VMF_Widget_Recent_Comments extends WP_Widget {
function VMF_Widget_Recent_Comments() {
$widget_ops = array('classname' => 'vmf_widget_recent_comments', 'description' => __( 'The most recent comments' ) );
$this->WP_Widget('vmf-recent-comments', __('VMF Recent Comments'), $widget_ops);
$this->alt_option_name = 'vmf_widget_recent_comments';
if ( is_active_widget(false, false, $this->id_base) )
<?php
function add_themescript()
{
if(!is_admin())
{ wp_enqueue_script('jquery');
wp_enqueue_script('thickbox',null,array('jquery'));
wp_enqueue_style('thickbox.css', '/'.WPINC.'/js/thickbox/thickbox.css', null, '1.0');
}
}
<?php
//* When a new page is selected from the primary menu,
//* execute the change_primary_menu function
add_action( 'template_redirect', 'change_primary_menu' );
function change_primary_menu() {
//* Do nothing if menu not supported
if ( ! genesis_nav_menu_supported( 'primary' ) )
return;
.enews-widget #subbutton {
transition: none;
text-decoration: none !important;
padding: 0px;
margin-top: 1em;
border: none;
display: block;
color: #FFFFFF !important;
vertical-align: top;
font-size: 1.2em;
<?php
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['billing']['billing_company']['label'] = 'Clinic Name';
$fields['shipping']['shipping_company']['label'] = 'Clinic Name';
$fields['billing']['billing_first_name']['label'] = 'Physician First Name';
$fields['billing']['billing_last_name']['label'] = 'Physician Last Name';
<?php
function genesis_header_menu_wrap( $menu ) {
if ( ! genesis_html5() )
return $menu;
return sprintf( '<nav>', genesis_attr( 'nav-header' ) ) . $menu . '</nav>';
}
<?php
function remove_divi_shortcodes( $content ) {
$content = preg_replace('/\[\/?et_pb.*?\]/', '', $content);
return $content;
}
<?php
$sitemap = sprintf( '<%2$s>%1$s</%2$s>', __( 'Pages:', 'genesis' ), $heading );
$sitemap .= sprintf( '<ul>%s</ul>', wp_list_pages( 'title_li=&echo=0&exclude=999' ) );
<?php
function filter_video_format_posts($query) {
/* change 999 to the page id for your archive page */
if ( !is_page ('999') )
return $query;
$taxquery = array(
array(
'taxonomy' => 'post_format',
.image-section {
display: table;
overflow: hidden;
table-layout: fixed;
width: 100%;
}