Wordpress Ana Sayfa Devamını Oku?

  • Kullanıcı aemin
  • Başlangıç tarihi Başlangıç tarihi
  • - Webmaster Soru ve Sorunlar

aemin

Kayıtlı Üye
Katılım
1 Mart 2015
Mesajlar
1.391
Tepkime puanı
0
Puan
0
Konum
Türkiye, Dünya
Web sitesi
aeminkyr.com
Merhabalar. Son iki gündür daha önce yaşamadığım bir sorunu yaşıyorum.
Sitemde ana sayfada resimin altında gösterilen yazının uzunluğunu değiştiremiyorum..
Tema ayarlarından uzunluğa ne yazarsam yazayım hiç bir tepki yok...
Farklı temalarda da denedim olmuyor...
Yardımcı olursanız sevinirim :)

8Z3pZQ.png

Ykazlz.png
 
Merhabalar. Son iki gündür daha önce yaşamadığım bir sorunu yaşıyorum.
Sitemde ana sayfada resimin altında gösterilen yazının uzunluğunu değiştiremiyorum..
Tema ayarlarından uzunluğa ne yazarsam yazayım hiç bir tepki yok...
Farklı temalarda da denedim olmuyor...
Yardımcı olursanız sevinirim :)

8Z3pZQ.png

Ykazlz.png

<?php echo mb_substr(get_the_excerpt(), 0,110); ?> <a href='<?php the_permalink(); ?>'>Devamı…</a>


yedek almayı unutma,index.php uygun yere monte edersın ama kodları baska sayfalardanda cekıyo olabılır,

bu arada content.php veya function.php excerpt kodundan olabılır sorunun
 
<?php echo mb_substr(get_the_excerpt(), 0,110); ?> <a href='<?php the_permalink(); ?>'>Devamı…</a>


yedek almayı unutma,index.php uygun yere monte edersın ama kodları baska sayfalardanda cekıyo olabılır,

bu arada content.php veya function.php excerpt kodundan olabılır sorunun

Hocam kodu neresine yerleştirmem gerekiyor, denedim 1-2 yere ama olmadı...
İndex.php
Kod:
<?php get_header(); ?>
<div class="mh-row clearfix">
    <div id="main-content" class="mh-col-2-3"><?php
        mh_joystick_lite_before_page_content();
        mh_joystick_lite_page_title();
        if (category_description()) : ?>
            <div class="cat-description"
            <?php echo category_description(); ?>
            </div>
        <?php endif; ?>
        <div id="mh-infinite"><?php
            if (have_posts()) :
                while (have_posts()) : the_post();
                    get_template_part('content');
                endwhile;
            else :
                get_template_part('content', 'none');
            endif; ?>
        </div>
        <?php mh_joystick_lite_pagination(); ?>
    </div>
    <?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>

Content.php
Kod:
<?php $mh_joystick_lite_options = mh_joystick_lite_theme_options(); ?>
<article <?php post_class('content-list clearfix'); ?>>
	<?php if (has_post_thumbnail()) { ?>
    	<div class="content-list-thumb">
    		<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    			<?php the_post_thumbnail('mh-joystick-lite-slider'); ?>
    		</a>
			<?php if (has_category()) { ?>
            	<span class="content-list-category">
            		<?php $category = get_the_category(); echo $category[0]->cat_name; ?>
            	</span>
            <?php } ?>
    	</div>
    <?php } ?>
    <header class="content-list-header">
        <h2 class="content-list-title">
            <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
                <?php the_title(); ?>
            </a>
        </h2>
    </header>
	<?php mh_joystick_lite_post_meta(); ?>
	<div class="content-list-excerpt">
		<?php the_excerpt(); ?>
	</div>
	<?php if ($mh_joystick_lite_options['read_more'] != '') { ?>
		<div class="content-list-more">
			<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
				<span><?php echo esc_attr($mh_joystick_lite_options['read_more']); ?></span>
			</a>
		</div>
	<?php } ?>
</article>

Functions.php
Kod:
<?php

/***** Fetch Options *****/

$mh_joystick_lite_options = get_option('mh_joystick_lite_options');

/***** Custom Hooks *****/

function mh_joystick_lite_before_page_content() {
    do_action('mh_joystick_lite_before_page_content');
}

function mh_joystick_lite_before_post_content() {
    do_action('mh_joystick_lite_before_post_content');
}

/***** Theme Setup *****/

if (!function_exists('mh_joystick_lite_themes_setup')) {
	function mh_joystick_lite_themes_setup() {
		load_theme_textdomain('mh-joystick-lite', get_template_directory() . '/languages');
		add_filter('use_default_gallery_style', '__return_false');
		add_theme_support('custom-header', array('default-image' => '', 'default-text-color' => 'ffffff', 'width' => 350, 'height' => 100, 'flex-width' => true, 'flex-height' => true));
		add_theme_support('title-tag');
		add_theme_support('automatic-feed-links');
		add_theme_support('html5', array('search-form'));
		add_theme_support('custom-background', array('default-color' => '0296c8'));
		add_theme_support('post-thumbnails');
		add_theme_support('customize-selective-refresh-widgets');
		add_image_size('mh-joystick-lite-slider', 728, 409, true);
		add_image_size('mh-joystick-lite-medium', 326, 183, true);
		add_image_size('mh-joystick-lite-small', 139, 78, true);
		register_nav_menus(array('main_nav' => __('Main Navigation', 'mh-joystick-lite')));
	}
}
add_action('after_setup_theme', 'mh_joystick_lite_themes_setup');

/***** Set Content Width *****/

if (!function_exists('mh_joystick_lite_content_width')) {
	function mh_joystick_lite_content_width() {
		global $content_width;
		if (!isset($content_width)) {
			if (is_page_template('template-full.php')) {
				$content_width = 1105;
			} else {
				$content_width = 728;
			}
		}
	}
}
add_action('template_redirect', 'mh_joystick_lite_content_width');

/***** Load CSS & JavaScript *****/

if (!function_exists('mh_joystick_lite_scripts')) {
	function mh_joystick_lite_scripts() {
		wp_enqueue_style('mh-google-fonts', "https://fonts.googleapis.com/css?family=Droid+Sans:400,700|Play:400,700", array(), null);
		wp_enqueue_style('mh-font-awesome', get_template_directory_uri() . '/includes/font-awesome.min.css', array(), null);
		wp_enqueue_style('mh-style', get_stylesheet_uri(), false, '1.1.0');
		wp_enqueue_script('mh-scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'));
		if (!is_admin()) {
			if (is_singular() && comments_open() && (get_option('thread_comments') == 1))
				wp_enqueue_script('comment-reply');
		}
	}
}
add_action('wp_enqueue_scripts', 'mh_joystick_lite_scripts');

if (!function_exists('mh_joystick_lite_admin_scripts')) {
	function mh_joystick_lite_admin_scripts($hook) {
		if ('widgets.php' === $hook) {
			wp_enqueue_style('mh-admin', get_template_directory_uri() . '/admin/admin.css');
		}
	}
}
add_action('admin_enqueue_scripts', 'mh_joystick_lite_admin_scripts');

/***** Register Widget Areas / Sidebars	*****/

if (!function_exists('mh_joystick_lite_widgets_init')) {
	function mh_joystick_lite_widgets_init() {
		register_sidebar(array('name' => __('Global - Sidebar', 'mh-joystick-lite'),	'id' => 'global-sidebar', 'description' => __('Sidebar widgets located on every page except the homepage, suitable for all widgets.', 'mh-joystick-lite'), 'before_widget' => '<div id="%1$s" class="sb-widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
		register_sidebar(array('name' => __('Home 1 - Main Column', 'mh-joystick-lite'), 'id' => 'home-main-column', 'description' => __('Main column widgets located on homepage only, suitable for widgets with the [MH] prefix and text widgets.', 'mh-joystick-lite'), 'before_widget' => '<div id="%1$s" class="home-main-widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
		register_sidebar(array('name' => __('Home 2 - Sidebar', 'mh-joystick-lite'), 'id' => 'home-sidebar', 'description' => __('Sidebar widgets located on homepage only, suitable for all widgets.', 'mh-joystick-lite'), 'before_widget' => '<div id="%1$s" class="sb-widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
	}
}
add_action('widgets_init', 'mh_joystick_lite_widgets_init');

/***** Include Several Functions *****/

require_once('includes/mh-customizer.php');
require_once('includes/mh-custom-functions.php');
require_once('includes/mh-widgets.php');



?>
 
Son düzenleme:
tick_lite_options = mh_joystick_lite_theme_options(); ?>
<article <?php post_class('content-list clearfix'); ?>>
<?php if (has_post_thumbnail()) { ?>
<div class="content-list-thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('mh-joystick-lite-slider'); ?>
</a>
<?php if (has_category()) { ?>
<span class="content-list-category">
<?php $category = get_the_category(); echo $category[0]->cat_name; ?>
</span>
<?php } ?>
</div>
<?php } ?>
<header class="content-list-header">
<h2 class="content-list-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</h2>
</header>
<?php mh_joystick_lite_post_meta(); ?>
<div class="content-list-excerpt">
<?php the_excerpt(); ?>
</div>
<?php if ($mh_joystick_lite_options['read_more'] != ') { ?>
<div class="content-list-more">
<?php the_excerpt(); ?>
<?php echo mb_substr(get_the_excerpt(), 0,110); ?> <a href='<?php the_permalink(); ?>”>Devamı…</a>
</a>
</div>
<?php } ?>

Content.php sılıp bu kodu eklermısın ama yedek almayı unutma

---------- Spam Engelliyici 22:16 ---------- Önceki Mesaj 22:14 ----------

<?php $mh_joystick_lite_options = mh_joystick_lite_theme_options(); ?>
<article <?php post_class('content-list clearfix'); ?>>
<?php if (has_post_thumbnail()) { ?>
<div class="content-list-thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('mh-joystick-lite-slider'); ?>
</a>
<?php if (has_category()) { ?>
<span class="content-list-category">
<?php $category = get_the_category(); echo $category[0]->cat_name; ?>
</span>
<?php } ?>
</div>
<?php } ?>
<header class="content-list-header">
<h2 class="content-list-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</h2>
</header>
<?php mh_joystick_lite_post_meta(); ?>
<div class="content-list-excerpt">
<?php echo mb_substr(get_the_excerpt(), 0,110); ?> <a href='<?php the_permalink(); ?>'>Devamı…</a>
</div>
<?php if ($mh_joystick_lite_options['read_more'] != '') { ?>
<div class="content-list-more">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<span><?php echo esc_attr($mh_joystick_lite_options['read_more']); ?></span>
</a>
</div>
<?php } ?>
</article>


olmadı bu kodu denermısın
 
tick_lite_options = mh_joystick_lite_theme_options(); ?>
<article <?php post_class('content-list clearfix'); ?>>
<?php if (has_post_thumbnail()) { ?>
<div class="content-list-thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('mh-joystick-lite-slider'); ?>
</a>
<?php if (has_category()) { ?>
<span class="content-list-category">
<?php $category = get_the_category(); echo $category[0]->cat_name; ?>
</span>
<?php } ?>
</div>
<?php } ?>
<header class="content-list-header">
<h2 class="content-list-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</h2>
</header>
<?php mh_joystick_lite_post_meta(); ?>
<div class="content-list-excerpt">
<?php the_excerpt(); ?>
</div>
<?php if ($mh_joystick_lite_options['read_more'] != ') { ?>
<div class="content-list-more">
<?php the_excerpt(); ?>
<?php echo mb_substr(get_the_excerpt(), 0,110); ?> <a href='<?php the_permalink(); ?>”>Devamı…</a>
</a>
</div>
<?php } ?>

Content.php sılıp bu kodu eklermısın ama yedek almayı unutma

---------- Spam Engelliyici 22:16 ---------- Önceki Mesaj 22:14 ----------

<?php $mh_joystick_lite_options = mh_joystick_lite_theme_options(); ?>
<article <?php post_class('content-list clearfix'); ?>>
<?php if (has_post_thumbnail()) { ?>
<div class="content-list-thumb">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('mh-joystick-lite-slider'); ?>
</a>
<?php if (has_category()) { ?>
<span class="content-list-category">
<?php $category = get_the_category(); echo $category[0]->cat_name; ?>
</span>
<?php } ?>
</div>
<?php } ?>
<header class="content-list-header">
<h2 class="content-list-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</h2>
</header>
<?php mh_joystick_lite_post_meta(); ?>
<div class="content-list-excerpt">
<?php echo mb_substr(get_the_excerpt(), 0,110); ?> <a href='<?php the_permalink(); ?>'>Devamı…</a>
</div>
<?php if ($mh_joystick_lite_options['read_more'] != '') { ?>
<div class="content-list-more">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<span><?php echo esc_attr($mh_joystick_lite_options['read_more']); ?></span>
</a>
</div>
<?php } ?>
</article>


olmadı bu kodu denermısın

Çok saolun hocam yardımınız için... İlk kod olmadı ikincisi oldu çok teşekkür ederim :)
 
senin koduna height değeri girilmiştir cssden oradan arttırmayı denedinmi?
 
Kişiselleştirme

Tema editörü

Ayarlar Renkler

  • Mobil kullanıcılar bu fonksiyonları kullanamaz.

    Alternatif header

    Farklı bir görünüm için alternatif header yapısını kolayca seçebilirsiniz.

    Görünüm Modu Seçimi

    Tam ekran ve dar ekran modları arasında geçiş yapın.

    Izgara Görünümü

    Izgara modu ile içerikleri kolayca inceleyin ve düzenli bir görünüm elde edin.

    Resimli Izgara Modu

    Arka plan görselleriyle içeriğinizi düzenli ve görsel olarak zengin bir şekilde görüntüleyin.

    Yan Paneli Kapat

    Yan paneli gizleyerek daha geniş bir çalışma alanı oluşturun.

    Sabit Yan Panel

    Yan paneli sabitleyerek sürekli erişim sağlayın ve içeriğinizi kolayca yönetin.

    Box görünüm

    Temanızın yanlarına box tarzı bir çerçeve ekleyebilir veya mevcut çerçeveyi kaldırabilirsiniz. 1300px üstü çözünürler için geçerlidir.

    Köşe Yuvarlama Kontrolü

    Köşe yuvarlama efektini açıp kapatarak görünümü dilediğiniz gibi özelleştirin.

  • Renginizi seçin

    Tarzınızı yansıtan rengi belirleyin ve estetik uyumu sağlayın.

Geri