MemberPress: Change Courses Listing Page Link

add_filter( ‘post_type_archive_link’, function ( $link, $post_type ) { if ( $post_type == ‘mpcs-course’ ) { $link = home_url() . ‘/courses/’; //replace the word courses with the custom page or post slug } return $link; }, 10, 2 );Continue reading

MemberPress: Change Stripe Checkout Description

function mepr_change_stripe_checkout_desc($desc, $payment) { if (isset($payment->settings->stripe_checkout_enabled) && $payment->settings->stripe_checkout_enabled == ‘on’) { $desc = “Pay with Apple Pay”; // Edit this. } return $desc; } add_filter(‘mepr_signup_form_payment_description’, ‘mepr_change_stripe_checkout_desc’, 10, 2);Continue reading

EIN – Süße Tiere – Gutenberg ausschalten

// Gutenberg für Beiträge und Seiten deaktivieren add_filter(‘use_block_editor_for_post’, ‘__return_false’); add_filter(‘use_block_editor_for_post_type’, ‘__return_false’, 10, 2); // Klassische Widgets wiederherstellen add_filter(‘use_widgets_block_editor’, ‘__return_false’); // Menüverwaltung sicherstellen (optional) add_filter(‘gutenberg_use_widgets_block_editor’, ‘__return_false’); // Gutenberg-Styles aus dem Frontend entfernen add_action(‘wp_enqueue_scripts’, function () { wp_dequeue_style(‘wp-block-library’); // Standard Block-Styles wp_dequeue_style(‘wp-block-library-theme’);…Continue reading

AUS – Allgemein – Kommentare vollständig deaktivieren

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

EIN – Süße Tiere – Bildanzeige für WP-Beiträge

// Beitragsbilder in der Beitragsübersicht anzeigen function add_thumbnail_column($columns) { $columns[‘thumbnail’] = __(‘Beitragsbild’); return $columns; } function show_thumbnail_column($column, $post_id) { if ($column === ‘thumbnail’) { echo get_the_post_thumbnail($post_id, [50, 50]); } } add_filter(‘manage_posts_columns’, ‘add_thumbnail_column’); add_action(‘manage_posts_custom_column’, ‘show_thumbnail_column’, 10, 2);Continue reading