funtion php yi paylaşmanızı istedim ilk mesajımda
function.php add_theme_support( 'post-thumbnails' );
resmi göstermek istediğiniz yere the_post_thumbnail( );
eklemelisiniz
function.php add_theme_support( 'post-thumbnails' );
resmi göstermek istediğiniz yere the_post_thumbnail( );
eklemelisiniz
pardon kusura bakmayın ,
/* Benzer Yazılar */
function get_thumb($postid=0, $size='full') {
if ($postid<1)
$postid = get_the_ID();
$thumb = get_post_meta($postid, "gorsel", TRUE);
if ($thumb != null or $thumb != '') {
echo $thumb;
}
elseif ($images = get_children(array(
'post_parent' => $postid,
'post_type' => 'attachment',
'numberposts' => '1',
'post_mime_type' => 'image', )))
foreach($images as $image) {
$thumbnail=wp_get_attachment_image_src($image->ID, $size);
?>
else {
echo get_bloginfo ( 'stylesheet_directory' );
echo '/images/resim_yok.gif';
}
}
/* Benzer Yazılar */
/* Sayfalama */
function sayfalama($pages = '', $range = 3)
{
$showitems = ($range * 2)+1;
global $paged;
if(empty($paged)) $paged = 1;
if($pages == '')
{
global $wp_query;
$pages = $wp_query->max_num_pages;
if(!$pages)
{
$pages = 1;
}
}
if(1 != $pages)
{
echo "";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "İlk";
if($paged > 1 && $showitems < $pages) echo "«";
for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
echo ($paged == $i)? "".$i."":"".$i."";
}
}
if ($paged < $pages && $showitems < $pages) echo "»";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Son";
echo "";
}
}
/* Sayfalama */
if(function_exists('register_sidebar')){
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '
'
));
}
/* TEMA PANELI */
if ( STYLESHEETPATH == TEMPLATEPATH ) {
define('OF_FILEPATH', TEMPLATEPATH);
define('OF_DIRECTORY', get_bloginfo('template_directory'));
} else {
define('OF_FILEPATH', STYLESHEETPATH);
define('OF_DIRECTORY', get_bloginfo('stylesheet_directory'));
}
require_once (OF_FILEPATH . '/admin/admin-functions.php');
require_once (OF_FILEPATH . '/admin/admin-interface.php');
require_once (OF_FILEPATH . '/admin/theme-options.php');
require_once (OF_FILEPATH . '/admin/theme-functions.php');
/* #TEMA PANELI */
/* Son Yorumlar */
function wpb_set_post_views($postID) {
$count_key = 'wpb_post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
$count = 0;
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
}else{
$count++;
update_post_meta($postID, $count_key, $count);
}
}
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
?>
function son_yorumlar($limit="5",$kelime_limiti="45",$avatar_boyutu="45",$baslangic_etiket="",$bitis_etiket=" ") {
global $wpdb;
$sorgu = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,$kelime_limiti) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $limit";
$yorumlar = $wpdb->get_results($sorgu);
foreach ($yorumlar as $yorum) {
$yorumid = $yorum->comment_ID;
$yorum_icerik = strip_tags($yorum->com_excerpt);
$avatar = get_avatar($yorum, $avatar_boyutu);
$yazan = strip_tags($yorum->comment_author);
echo $baslangic_etiket.''.$avatar.'' .$yorum_icerik.'
'.$yazan.''.$bitis_etiket;
}
}
/* Son Yorumlar */
// YORUM LISTELE
function sinyor_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
$PostAuthor = false;
if($comment->comment_author_email == get_the_author_email()) {
$PostAuthor = true;}
elseif($comment->comment_author_email == 'yusufcancelik@hotmail.com') {
$PostAuthor = true;}
?>
id="li-yorum-">
// #YORUM LISTELE
// Temaya Menü Desteği //
add_theme_support( 'nav-menus' );
register_nav_menu('anamenu', 'Ana Menü alanı');
?>
kodlar bunlar ancak ikinci kodu tam nereye ekleyemelim bilmiyorum
%s'), get_comment_author_link()) ?>
comment_approved == '0') : ?>
Yorumunuz onaylandıktan sonra görüntülenecektir.