Skip to content

Instantly share code, notes, and snippets.

View fdeross's full-sized avatar

Frank DeRossitt fdeross

View GitHub Profile
@fdeross
fdeross / functions.php
Last active March 8, 2021 16:01
Vendor Shop SEO Override for Rank Math
// 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 ) ) {
@fdeross
fdeross / customfields.php
Last active March 16, 2021 04:44
Frosting Product Custom Fields
// 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">',