Envira – Change the Lightbox Image Counter label

/* Change the Image Counter text * * @link https://enviragallery.com/docs/how-to-change-the-image-counter-text/ */ add_filter( ‘envirabox_theme_image_counter’, ‘test_envirabox_theme_image_counter’, 10, 3 ); function test_envirabox_theme_image_counter( $html, $theme, $data ) { //Replace Video with your own label for the counter return str_replace(‘Image’, ‘Video’, $html); }Continue reading

Envira Albums – Change the Homepage URL inside Envira Breadcrumbs

/* Change the Homepage URL inside Envira Breadcrumbs * * @link https://enviragallery.com/docs/how-to-change-the-homepage-url-inside-envira-breadcrumbs/ */ add_filter( ‘envira_breadcrumbs_data’, ‘test_envira_breadcrumbs_data’, 10, 5 ); function test_envira_breadcrumbs_data( $breadcrumbs, $album_id, $gallery_id, $separator, $album_post_id ) { //Change the title and url to your own $breadcrumbs[0][‘title’] = ‘Envira Gallery…Continue reading

Envira – Display Adsense Ads in Lightbox

/* Display Adsense Ads inside your gallery images lightbox * * @link https://enviragallery.com/docs/display-adsense-ads-in-lightbox/ */ add_filter( ‘envirabox_inner_below’, ‘envira_add_ads’, 11, 2 ); function envira_add_ads( $template, $data ){ //Replace my-ad-script-here with your actual Adsense Ad script $template .=’ my-ad-script-here ‘; return $template; }Continue reading

MemberPress: Display Current User’s Memberships Renewal Dates

function mp_membership_renewal_date() { if (!is_user_logged_in()) { return ‘You need to be logged in to view this information.’; } global $wpdb; $user_id = get_current_user_id(); // Query to get all active MemberPress transactions for the current user $transactions = $wpdb->get_results($wpdb->prepare( “SELECT txn.*,…Continue reading

MemberPress: Display Current User’s Memberships Statuses

function mp_membership_status() { if (!is_user_logged_in()) { return ‘You need to be logged in to view this information.’; } global $wpdb; $user_id = get_current_user_id(); // Query to get all active MemberPress transactions for the current user $transactions = $wpdb->get_results($wpdb->prepare( “SELECT txn.*,…Continue reading

Envira Featured Content – Add Additional Content to Featured Content

/* Adding Date, Author, Category, Taxonomy To Featured Content output * * @link https://enviragallery.com/docs/adding-date-author-category-taxonomy-to-featured-content/ */ function envira_fc_date_terms( $content, $posts, $data, $post ) { if ( isset($data[‘config’][‘id’]) && !empty($data[‘config’][‘id’]) ) { $gallery = get_post( intval( $data[‘config’][‘id’] ) ); } // Build…Continue reading