Auto-Collapse Long Comments

add_filter( ‘comment_text’, function( $comment_content ) { $max_length = 100; // Set the maximum length of the comment to display without collapsing if ( strlen( $comment_content ) > $max_length ) { $short_content = substr( $comment_content, 0, $max_length ) . ‘…’; $full_content…Continue reading

Replace Post Title with ACF field

function sync_acf_post_title($post_id, $post, $update) { $acf_name = get_field(‘name’, $post_id); // Get the value of the “name” ACF field $acf_vorname = get_field(‘vorname’, $post_id); // Get the value of the “vorname” ACF field $post_type = get_post_type($post_id); if ($acf_name && $post_type === “kontakte”)…Continue reading

Admin Giriş Url’sini Değiştir

// Giriş URL’sini değiştir function custom_login_url() { return home_url(‘/panel/’); // Buraya yeni giriş URL’nizi yazın } add_filter(‘login_url’, ‘custom_login_url’); // WordPress login sayfasını yeni URL’ye yönlendirme function custom_login_redirect() { if (strpos($_SERVER[‘REQUEST_URI’], ‘wp-login.php’) !== false) { wp_redirect(home_url(‘/panel/’)); // Buraya yeni giriş URL’nizi…Continue reading

Zoom support for mobile devices

function remove_my_action() { remove_action(‘wp_head’, ‘et_add_viewport_meta’); } function dt_et_add_viewport_meta(){ echo ‘‘; } add_action( ‘init’, ‘remove_my_action’); add_action( ‘wp_head’, ‘dt_et_add_viewport_meta’ );Continue reading