Download Details Featured Image (copy)

function sd_edd_download_details_widget_thumbnail( $instance ) { $download_id = isset( $instance[‘download_id’] ) ? $instance[‘download_id’] : 0; if ( ‘current’ === $instance[‘display_type’] ) { $download_id = get_the_ID(); } if ( empty( $download_id ) || ! has_post_thumbnail( $download_id ) || ‘download’ !== get_post_type( $download_id…Continue reading

custom-add-to-cart-or-resume

function ld_course_resume_or_buy_shortcode( $atts ) { $atts = shortcode_atts( [ ‘course_id’ => get_the_ID(), // use current course if none passed ‘resume_label’ => ‘Resume Course’, ‘buy_label’ => ‘Buy Now’, ], $atts ); $course_id = intval( $atts[‘course_id’] ); $user_id = get_current_user_id(); // Check…Continue reading

1. Theme Setup & Styles

/** * Lädt Parent Stylesheet, Child Stylesheet (optional, aber empfohlen), * Owl Carousel Styles und Owl Carousel Skript. */ add_action( ‘wp_enqueue_scripts’, ‘mein_child_theme_enqueue_styles_and_scripts’, 20 ); // Funktionsname angepasst, Priorität 20 function mein_child_theme_enqueue_styles_and_scripts() { // Lade Parent Theme Stylesheet wp_enqueue_style( ‘parent-style’, get_template_directory_uri()…Continue reading

46. After Header – Elementor Shortcode

/** * Zeigt das Elementor Template nach dem Header an. * Hängt sich an ‘mein_child_theme_after_header’ in header.php. */ add_action(‘mein_child_theme_after_header’, ‘mein_child_theme_display_after_header_content’); function mein_child_theme_display_after_header_content() { // Stelle sicher, dass die Shortcode-Funktion existiert if (function_exists(‘do_shortcode’)) { $template_id = ‘43487’; // Elementor Template ID…Continue reading

45. Header – Custom Icons (Search + Cart)

/** * Zeigt die benutzerdefinierten Header Icons (Suche und Warenkorb) an. * Hängt sich an ‘mein_child_theme_header_icons’ in header.php. */ add_action(‘mein_child_theme_header_icons’, ‘mein_child_theme_display_header_icons’); function mein_child_theme_display_header_icons() { // Prüfe ob WooCommerce und die Warenkorb-Funktion existieren $cart_count = 0; if ( class_exists(‘WooCommerce’) && function_exists(‘WC’)…Continue reading

44. Header – Topbar Shortcode

/** * Zeigt die Topbar via Elementor Shortcode an. * Hängt sich an ‘mein_child_theme_topbar’ in header.php. */ add_action(‘mein_child_theme_topbar’, ‘mein_child_theme_display_topbar’); function mein_child_theme_display_topbar() { // Stelle sicher, dass die Shortcode-Funktion existiert if (function_exists(‘do_shortcode’)) { $template_id = ‘28958’; // Elementor Template ID ?>Continue reading

43. Header – ACF Action Bar

/** * Zeigt die ACF-basierte Action Bar im Header an. * Hängt sich an ‘mein_child_theme_action_header’ in header.php. */ add_action(‘mein_child_theme_action_header’, ‘mein_child_theme_display_action_header’); function mein_child_theme_display_action_header() { // Prüfe ob ACF aktiv ist if (!function_exists(‘get_field’)) return; $actionText = get_field(‘text_actiebalk_header’, ‘option’); $visibility = get_field(‘action_header_visibility’, ‘option’);…Continue reading

42. Head Assets – Late (eTrusted)

/** * Fügt den eTrusted Script Tag spät im Bereich hinzu. * Hängt sich an ‘mein_child_theme_late_head_assets’ in header.php (nach wp_head()). */ add_action(‘mein_child_theme_late_head_assets’, ‘mein_child_theme_add_etrusted_script’, 5); function mein_child_theme_add_etrusted_script() { ?>Continue reading