MemberPress: Add Logout Confirmation Popup
function mepr_logout_confirmation() { ?>Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function mepr_logout_confirmation() { ?>Continue reading
function mepr_acount_links_shortcode() { $mepr_options = MeprOptions::fetch(); $account_url = $mepr_options->account_page_url(); $links = ‘ ‘; $links .= ‘ Home ‘; $links .= ‘ Subscriptions ‘; $links .= ‘ Payments ‘; $links .= ‘ Courses ‘; $links .= ‘ Logout ‘; $links .=…Continue reading
add_filter( ‘aioseo_breadcrumbs_trail’, function( $crumbs ) { if(is_singular(‘post’) || is_category()){ $blog = [ ‘label’ => ‘Resources’, ‘link’ => ‘https://whatisnosy.com/resources’, ‘type’ => ” ]; array_splice( $crumbs, 0, 0, [$blog] ); } return $crumbs; }, 10, 2);Continue reading
function append_language_to_external_links($content) { // Get the current language of your blog $current_language = apply_filters( ‘wpml_current_language’, NULL ); if ($current_language == “en”){ $current_language = “”; } // Create a DOMDocument instance to parse the content $dom = new DOMDocument(); libxml_use_internal_errors(true); //…Continue reading
add_filter( ‘aioseo_sitemap_exclude_posts’, ‘aioseo_sitemap_filter_excluded_posts’, 10, 2 ); function aioseo_sitemap_filter_excluded_posts( $ids, $type ) { if ( ‘news’ === $type ) { $category_id = 136; $posts_in_category = get_posts(array( ‘category’ => $category_id, ‘numberposts’ => -1, ‘fields’ => ‘ids’ )); $ids = array_merge($ids, $posts_in_category); }…Continue reading
if ( ! function_exists( ‘theme_setup_unocss_assets’ ) ) : function theme_setup_unocss_assets() { wp_enqueue_style( ‘unocss-reset’, ‘https://unpkg.com/@unocss/reset/tailwind.css’, array(), null ); wp_enqueue_script( ‘unocss-preset-uno’, ‘https://unpkg.com/@unocss/runtime/uno.global.js’, array(), null, true ); wp_enqueue_script( ‘unocss-preset-icons’, ‘https://unpkg.com/@unocss/runtime/preset-icons.global.js’, array(), null, true ); wp_add_inline_script( ‘unocss-preset-icons’, ‘window.__unocss = { presets: [ () =>…Continue reading
function mepr_change_uname_or_email_text() { return ‘Custom text’; } add_filter(‘mepr-login-uname-or-email-str’, ‘mepr_change_uname_or_email_text’ );Continue reading
function add_custom_javascript() { // Check if we’re on a single post or page if(is_singular()) { // Get the post ID of the current post or page $post_id = get_the_ID(); // Check if the custom field ‘funnel’ exists and get its…Continue reading
add_action( ‘woocommerce_single_product_summary’, ‘display_product_formated_dimensions_table’, 25 ); function display_product_formated_dimensions_table(){ global $product; if ( $product->has_dimensions() ) { echo ‘ ‘ . __( ‘Dimensions’, ‘woocommerce’ ) . ‘ ‘ . esc_html( wc_format_dimensions( $product->get_dimensions( false ) ) ) . ‘ ‘; } }Continue reading