Skip to content

Instantly share code, notes, and snippets.

View vfontjr's full-sized avatar

Victor M. Font Jr. vfontjr

View GitHub Profile
<?php
/*
Function Name: Create Thank You form Entries
Description: Creates one entry in Thank You form for each winner recorded in repeatable field section of invoice form.
Version: 1.0
Author: Victor M. Font Jr.
Author URI: https://victorfont.com/
*/
/* add the action at a higher priority than 41 so it executes after Zaperi add-on */
@vfontjr
vfontjr / genesis_seo_title_url_change.php
Created January 31, 2019 20:09
Change URL in Genesis Framework SEO Title
<?php
add_filter( 'genesis_seo_title', 'child_header_title', 10, 3 );
function child_header_title( $title, $inside, $wrap ) {
$inside = sprintf( '<a href="https://example.com/" title="%s">%s</a>', esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
return sprintf( '<%1$s class="site-title">%2$s</%1$s>', $wrap, $inside );;
}
@vfontjr
vfontjr / alignfull-alignwide.css
Last active March 16, 2019 16:26
Adustments to Genesis CSS for Gutenberg
.entry-content .alignfull,
.entry-content .alignwide {
margin-left : calc( -100vw / 2 + 100% / 2 );
margin-right : calc( -100vw / 2 + 100% / 2 );
max-width : 100vw;
}
@vfontjr
vfontjr / acf_blocks.php
Last active April 16, 2019 22:56
Source Code for Custom Gutenberg Blocks w/ Advanced Custom Fields Blocks Feature
<?php
/* ACF Blocks requires ACF Pro Ver. 5.8 or higher */
/* save this file to /lib/ directory in your child theme folder */
/* if the directory doesn't exist, create it */
function vfcg_register_blocks() {
if( ! function_exists('acf_register_block') )
return;
acf_register_block( array(
@vfontjr
vfontjr / collapsible-section-after.html
Last active May 16, 2019 13:56
Add Keyboard Accessibility to Formidable Forms Collapsible Sections
<div id="frm_field_[id]_container" class="frm_form_field frm_section_heading form-field[error_class]">
<h3 class="frm_pos_[label_position][collapse_class]" tabindex="0">[field_name]</h3>
[if description]<div class="frm_description">[description]</div>[/if description]
[collapse_this]
</div>
@vfontjr
vfontjr / add_shortcode.php
Last active August 23, 2019 13:53
Convert Integers to Roman Numerals
<? php
add_shortcode( 'roman_copyright', 'roman_copyright_shortcode' );
/* to use the shortcode, insert this into the footer
[roman_copyright before="Copyright " first="2003" after=" Victor M. Font Jr."]
*/
@vfontjr
vfontjr / capitalize-first-letter.js
Last active September 1, 2019 04:13
Capitalize first letter of Formidable Form field
<script>
jQuery(document).ready(function($) {
"use strict";
$("#field_xxxxxx").keydown(function () {
var _val = $(this).val(),
_txt = _val.charAt(0).toUpperCase() + _val.slice(1);
$(this).val(_txt);
})
});
@vfontjr
vfontjr / button-at-top.css
Last active September 5, 2019 06:30
Formidable Masterminds - Move Submit Button to Top of Form
.button-at-top {
position: absolute;
top: 0;
left: 0;
right: 0;
}
@vfontjr
vfontjr / page-break-button.css
Last active September 17, 2019 16:40
Masterminds: Change Page Break Button Color
.frm_form_fields.frm_page_num_1 .frm_submit input {
color: #2b792b;
border-color: #2b792b;
}
.frm_form_fields.frm_page_num_1 .frm_submit input:hover,
.frm_form_fields.frm_page_num_1 .frm_submit input:focus {
background-color: #2b792b;
color: #fff;
border-color: #fff;
@vfontjr
vfontjr / remove_category_from_crumb_url.php
Created November 20, 2019 19:40
Remove /catagory/ from Genesis breadcrumbs URL
<?php
add_filter( 'genesis_post_crumb', 'remove_category_from_crumb_url', 10, 3);
function remove_category_from_crumb_url( $crumb, $args, $cat_crumb ) {
$crumb = str_replace("/category/","/",$crumb);
return $crumb;
}