İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

Kategorideki Sayfaları Yeni Sekmede Açma?

Snowmann

0
İyinet Üyesi
Katılım
19 Mayıs 2011
Mesajlar
71
Reaction score
0
Kategori sayfasında listelenen yazılara tıklanınca yeni sekmede açılmasını istiyorum. Nasıl yapabilirim?
 

Inferno

0
İyinet Üyesi
Onaylı Üye
Katılım
10 Eylül 2006
Mesajlar
652
Reaction score
2
Konum
Houston
temanın archive.php dosyasının içeriğini buraya yapıştırırsan yardımcı olabilirim.
 

Snowmann

0
İyinet Üyesi
Katılım
19 Mayıs 2011
Mesajlar
71
Reaction score
0
temanın archive.php dosyasının içeriğini buraya yapıştırırsan yardımcı olabilirim.

Teşekkürler. Archive.php bu;

PHP:
<?php
/**
 * The archive template file
 *
 * @package WordPress
 * @subpackage Graphene
 * @since Graphene 1.1.5
 */
get_header();
?>

<?php
/* Queue the first post, that way we know
 * what date we're dealing with (if that is the case).
 *
 * We reset this later so we can run the loop
 * properly with a call to rewind_posts().
 */
if (have_posts())
    the_post();
?>

<h1 class="page-title">
    <?php if (is_day()) : ?>
        <?php printf(__('Daily Archive: <span>%s</span>', 'graphene'), get_the_date()); ?>
    <?php elseif (is_month()) : ?>
        <?php printf(__('Monthly Archive: <span>%s</span>', 'graphene'), 
		/* translators: F will be replaced with month, and Y will be replaced with year, so "F Y" in English would be replaced with something like "June 2008". */
		get_the_date(__('F Y', 'graphene'))); ?>
    <?php elseif (is_year()) : ?>
        <?php printf(__('Yearly Archive: <span>%s</span>', 'graphene'), get_the_date('Y')); ?>
    <?php elseif (is_category()) : ?>
        <?php $cats = get_the_category(); printf(__('Category Archive: <span>%s</span>', 'graphene'), $cats[0]->name); ?>
    <?php else : ?>
        <?php _e('Blog Archive', 'graphene'); ?>
    <?php endif; ?>
</h1>
<?php
    /* Since we called the_post() above, we need to
     * rewind the loop back to the beginning that way
     * we can run the loop properly, in full.
     */
    rewind_posts();

    /* Run the loop for the archives page to output the posts.
     * If you want to overload this in a child theme then include a file
     * called loop-archives.php and that will be used instead.
     */
    get_template_part('loop', 'archive');
?>

<?php get_footer(); ?>

Bu da category.php;

PHP:
<?php
/**
 * The category archive template file
 *
 * @package WordPress
 * @subpackage Graphene
 * @since Graphene 1.1.5
 */
get_header();
?>

<h1 class="page-title">
    <?php
        printf(__('Category Archive: <span>%s</span>', 'graphene'), single_cat_title('', false));
    ?>
</h1>
<?php /* The category description */
	$cat_desc = category_description();
if ($cat_desc) : ?>
    <div class="cat-desc">
        <?php echo $cat_desc; ?>
    </div>
<?php endif; ?>

<?php
    /* Run the loop for the category page to output the posts.
     * If you want to overload this in a child theme then include a file
     * called loop-category.php and that will be used instead.
     */
    get_template_part('loop', 'category');
?>

<?php get_footer(); ?>
 

Inferno

0
İyinet Üyesi
Onaylı Üye
Katılım
10 Eylül 2006
Mesajlar
652
Reaction score
2
Konum
Houston
[/PHP][/PHP][/PHP][/PHP]BU AYARLARI YAPMADAN ÖNCE KESİNLİKLE DOSYALARINI YEDEKLE

bu dosyalarla değiştirilecek birşey bulamadım. Fakat tema ismini graphene olduğunu düşünüyorum. Eğer tema dosyalarının içerisinbde loop-post-formats şeklinde bir dosya var ise o dosyayı aşağıdaki şekilde değiştir.



PHP:
<?php /* Posts navigation for single post pages, but not for Page post */ global $graphene_settings; ?>
<?php if (is_single() && !is_page()) : ?>
<div class="post-nav clearfix">
	<p id="previous"><?php previous_post_link(); ?></p>
	<p id="next-post"><?php next_post_link(); ?></p>
	<?php do_action('graphene_post_nav'); ?>
</div>
<?php endif; ?>

<div id="post-<?php the_ID(); ?>" <?php post_class('clearfix post-format'); ?>>
	<div class="entry-header">
    	<?php 
		global $post_format;
		switch ($post_format){
			case 'status': $format_title = __('Status update', 'graphene');	break;
			case 'audio': $format_title = __('Audio', 'graphene'); break;
			case 'image': $format_title = __('Image', 'graphene'); break;
			case 'video': $format_title = __('Video', 'graphene'); break;
			default: $format_title = __('Post format', 'graphene');
		}
		?>
        <p class="format-title"><a target="_blank" href="<?php the_permalink(); ?>"><?php echo $format_title; ?></a></p>
        
        <?php /* The post title */ ?>
        <div class="entry-title">
			<?php if ($post_format == 'status') : ?>
            <?php /* translators: This is the PHP date formatting string for the status post format. See http://php.net/manual/en/function.date.php for more details. */ ?>
            <p class="entry-date updated"><?php printf('%1$s — %2$s', get_the_time(__('l F j, Y', 'graphene')), get_the_time(__('g:i A', 'graphene'))); ?></p>
            <?php endif; ?>
            
            <?php if (in_array($post_format, array('audio', 'image', 'video'))) : ?>
			<p class="entry-permalink"><a target="_blank" href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permalink to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?></a></p>
            <?php endif; ?>
            
            <?php /* Edit post link, if user is logged in */ ?>
			<?php if (is_user_logged_in()) : ?>
            <p class="edit-post">
                <?php edit_post_link(__('Edit post','graphene'), ' (', ')'); ?>
            </p>
            <?php endif; ?>
        </div>
    </div>
    <div class="entry-content clearfix">
    	<div class="post-format-thumbnail">
    	<?php if ($post_format == 'status') : /* Author's avatar, displayed only for the 'status' format */ ?>
    		<?php echo get_avatar(get_the_author_meta('user_email'), 110); ?>
        <?php endif; ?>
        
        <?php if ($post_format == 'audio') : /* Featured image, displayed only for the 'audio' format */ 
			if (has_post_thumbnail(get_the_ID())) {the_post_thumbnail(array(110,110));}
        endif; ?>
        </div>
        
        <?php /* Modify the content_width var for video post format */ 
			if ($post_format == 'video'){
				global $content_width; 
				if (strpos($graphene_settings['post_date_display'], 'icon') === 0)
					$content_width -= 25;
				else
					$content_width -= 80;
			}
		?>
        
        <?php /* Output the post content */ ?>
        <?php the_content(); ?>
        
        <?php /* Revert the content_width var for video post format */ 
			if ($post_format == 'video'){
				if (strpos($graphene_settings['post_date_display'], 'icon') === 0)
					$content_width += 25;
				else
					$content_width += 80;	
			}
		?>
        
        <?php if (in_array($post_format, array('image', 'video'))) : ?>
		<?php /* translators: This is the PHP date formatting string for the image post format. See http://php.net/manual/en/function.date.php for more details. */ ?>
        <p class="entry-date updated"><?php printf( __( 'Posted on: %s', 'graphene' ), '<br /><span>' . get_the_time( __( 'F j, Y', 'graphene') ) . '</span>' ); ?></p>
        <?php endif; ?>
        
        <?php if ($post_format == 'status') : /* Post author, displayed only for the 'status' format */ ?>
        <p class="post-author vcard">— <span class="fn nickname"><?php the_author_posts_link(); ?></span></p>
        <?php endif; ?>
    </div>
</div>

sonuç ile ilgili p.m. gönderirsen sevinirim.
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst