Wordpress: Son eklenen yazılar > uzun başlıkların 2. satıra geçmesini önlemek?
7
●409
- 23-07-2015, 23:21:22Maharaja adlı üyeden alıntı: mesajı görüntüleAspavA adlı üyeden alıntı: mesajı görüntüle
yada css ile başlıkların kapsarına sabit genişlik ve yükselik verip overflow:hidden özelliğini kullanabilirsin - 24-07-2015, 14:00:34örnek bir css kodu.kullandığın temaya göre düzenleyebilirsin.tema'yı veya kodları görsek daha çok yardımcı olabiliriz.
#sidebar { width: 280px; overflow: hidden; /* taşanları gizle */ white-space: nowrap; /* alt satıra hiç inme */ text-overflow: ellipsis; /* eğer uzunsa üç nokta koy */} - 26-07-2015, 14:42:56Denedim de beceremedim. yardımcı olma imkanınız var mı?AspavA adlı üyeden alıntı: mesajı görüntüle
dosya içeriği aşaüıdakidir.
require_once ( get_template_directory() .'/functions/theme-customizer/logo.php' ); require_once ( get_template_directory() .'/functions/theme-customizer/general.php' ); require_once( get_template_directory() .'/functions/scripts.php' ); require_once( get_template_directory() .'/functions/widget-areas.php' ); require_once( get_template_directory() .'/functions/excerpts.php'); if( is_admin() ) { require_once ( get_template_directory() .'/functions/recommend-plugins.php' ); require_once( get_template_directory() .'/functions/welcome.php'); require_once( get_template_directory() .'/functions/dashboard-feed.php'); } else { require_once( get_template_directory() .'/functions/comments-callback.php'); require_once( get_template_directory() .'/functions/image-default-sizes.php'); require_once( get_template_directory() .'/functions/pagination.php'); require_once( get_template_directory() .'/functions/aqua-resizer.php'); } /** Theme Setup **/ add_action( 'after_setup_theme', 'wpex_theme_setup' ); function wpex_theme_setup() { // Localization support load_theme_textdomain( 'wpex', get_template_directory() .'/languages' ); // Editor CSS // add_editor_style( 'css/editor-style.css' ); // Register navigation menus register_nav_menus ( array( 'main_menu' => __('Main','wpex') ) ); // Add theme support add_theme_support('automatic-feed-links'); add_theme_support('custom-background'); add_theme_support('post-thumbnails'); } - 26-07-2015, 15:31:35Maharaja adlı üyeden alıntı: mesajı görüntüle
function.php nizde herhangi bir yere aşagıdaki kodları ekleyin
function kisa_baslik($char) { $title = get_the_title($post->ID); $title = substr($title,0,$char); echo $title; }
be index.php nizde the_title yani konu başlıgına
<?php kisa_baslik(20); ?>
kodu ile çektirin başlıklarınızı burada ki 20 degeri başlık uzunluk sayısıdır.