Skip to content

Instantly share code, notes, and snippets.

Avatar

Frank DeRossitt fdeross

View GitHub Profile
@fdeross
fdeross / customfields.php
Last active Mar 16, 2021
Frosting Product Custom Fields
View customfields.php
// Add Custom fields
add_action( 'wcv_after_product_details', 'wcv_frosting_taxonomy' );
function wcv_frosting_taxonomy( $object_id ){
WCVendors_Pro_Form_helper::select2( array(
'post_id' => $object_id,
'id' => 'wcv_custom_taxonomy_holiday[]',
'class' => 'select2',
'custom_tax' => true,
'label' => __('Holidays', 'wcvendors-pro'),
'wrapper_start' => '<div class="all-100">',
@fdeross
fdeross / functions.php
Last active Mar 8, 2021
Vendor Shop SEO Override for Rank Math
View functions.php
// Change OG title for Rank Math on Vendor Pages
function wcv_rankmath_change_og_title( $title ) {
WC_Vendors::log( $title );
if ( WCV_Vendors::is_vendor_page() ) {
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) );
$vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop );
$shop_title = get_user_meta( $vendor_id, 'pv_shop_name', true );
$og_title = get_user_meta( $vendor_id, 'wcv_seo_fb_title', true );
if ( ! empty( $og_title ) ) {