emerald adlı üyeden alıntı:
mesajı görüntüle
14
●634
Ivır zıvır işlerle değilde siteye zaman ayırabilmeli site sahibi.
<?php
/*
Template Name: Blog
*/
get_header();
?>
<div class="mh-wrapper clearfix">
<div id="main-content" class="mh-loop mh-content" role="main">
<?php
mh_before_page_content();
// WP_Query arguments
$args = array(
'category_name' => 'kategori1,kategori2'
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();?>
<article class="mh-loop-item clearfix post-33 post type-post status-publish format-standard has-post-thumbnail hentry">
<figure class="mh-loop-thumb">
<a href="<?php echo get_the_permalink(); ?>">
<img width="326" height="245" src="<?php echo wp_get_attachment_url(get_post_thumbnail_id()); ?> " class="attachment-mh-magazine-lite-medium size-mh-magazine-lite-medium wp-post-image" alt="">
</a>
</figure>
<div class="mh-loop-content clearfix">
<header class="mh-loop-header">
<h3 class="entry-title mh-loop-title">
<a href="<?php echo get_the_permalink(); ?>" rel="bookmark"><?php echo get_the_title(); ?></a>
</h3>
<div class="mh-meta mh-loop-meta">
<span class="mh-meta-date updated"><i class="fa fa-clock-o"></i><?php the_time('j F Y ') ?></span>
<span class="mh-meta-author author vcard"><i class="fa fa-user"></i><?php the_author_posts_link(); ?></span>
<span class="mh-meta-comments"><i class="fa fa-comment-o"></i><?php comments_popup_link('0', '1 Yorum', '% Yorum'); ?></span>
</div>
</header>
<div class="mh-loop-excerpt">
<div class="mh-excerpt"><?php echo get_the_excerpt(); ?></div>
</div>
</div>
</article>
<?php
mh_magazine_lite_pagination();
}
} else {
get_template_part('content', 'none');
}
wp_reset_postdata();?>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>Blog adında sayfa oluşturup sağdan sayfa şablonunu blog olarak seçip kaydet. İşlem tamamdır.
Eğer imkanınız varsa öğrenin. Yapamayacağınız şey yok
istediğim haftalardır aradığım cevabı verdi tugh life yaptı
çekti gitti