بابهت: جۆن ئەمە لابەرم؟

مەکۆکانی وێبچن » WordPress » جۆن ئەمە لابەرم؟
پهڕه 1
دهبێت لە ژوورەوە بیت یان ببیت بە ئەندام بۆ ئهوهی بتوانیت وهڵام بنووسیت
کۆدەکانی نێو Single.php یان Post.php تایبەت بە ڕووکارەکەت دابنێ.
<?php get_header();?>
<div id="content">
<?php include 'sidebar.php';?>
<div id="content-main">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="posttitle">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="post-info"><?php the_time('M jS, Y') ?> by <?php the_author_posts_link() ?> <?php edit_post_link('Edit', '', ' | '); ?> </p>
</div>
<div class="entry">
<?php the_content(); ?>
<?php wp_link_pages(); ?>
</div>
<p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php comments_number('No Comments', '1 Comment','% Comments')?></p>
</div>
<?php comments_template(); ?>
<?php endwhile; ?>
<p align="center"><?php posts_nav_link(' - ','« Prev','Next »') ?></p>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div><!-- end id:content-main -->
<?php get_footer();?><?php get_header();?>
<div id="content">
<?php include 'sidebar.php';?>
<div id="content-main">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="posttitle">
<h2><a style="color:003366;<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="post-info"><?php the_time('M jS, Y') ?> by <?php the_author_posts_link() ?> <?php edit_post_link('Edit', '', ' | '); ?> </p>
</div>
<div class="entry">
<?php the_content(); ?>
<?php wp_link_pages(); ?>
<?php $sub_pages = wp_list_pages( 'sort_column=menu_order&depth=1&title_li=&echo=0&child_of=' . $id );?>
<?php if ($sub_pages <> "" ){?>
<p class="post-info">This page has the following sub pages.</p>
<ul><?php echo $sub_pages; ?></ul>
<?php }?>
</div>
<p class="postmetadata"><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
<?php comments_template(); ?>
</div>
<?php endwhile; ?>
<p align="center"><?php posts_nav_link(' - ','« Prev','Next »') ?></p>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div><!-- end id:content-main -->
<?php get_footer();?>لە ئەو پەڕگانە نییە، هەروەها بۆ ئایندە بنووسە فڵان کۆد هی فڵان پەڕەیە.
بگەڕێ بە دوای پەڕگەیەک کە ناوی header.php یان شتێکی هاوشێوە بێت، ئەگەر نە، ناوی ڕووکارەکەت بنووسە.
لە نێو header.php لە خوارەوەی پەڕەکە ئەو کۆدانە هەیە بیسڕەوە،
<dl>
<dt style="padding-left:10px;"><strong>RSS Feeds:</strong></dt>
<dd><a href="<?php bloginfo('rss2_url'); ?>">Posts</a></dd>
<dd><a href="<?php bloginfo('comments_rss2_url'); ?>">Comments</a></dd>
</dl>ئەمە هیدەرە
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<meta name="keywords" content="<?php bloginfo('description'); ?>" />
<meta name="description" content="<?pginfo('stylesheet_directory');?>/style.css" type="text/css" media="screen" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="green-theme" href="<?php bloginfo('stylesheet_directory');?>/style2.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="<?php bloginfo('stylesheet_directory');?>/style3.css" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory');?>/style-switch.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory');?>/top.js"></script>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php
global $page_sort;
if(get_settings('bluecharm_sortpages')!='')
{
$page_sort = 'sort_column='. get_settings('bluecharm_sortpages');
}
global $pages_to_exclude;
if(get_settings('bluecharm_excludepages')!='')
{
$pages_to_exclude = 'exclude='. get_settings('bluecharm_excludepages');
}
?>
<?php wp_head(); ?>
</head>
<body id="section-index">
<div id="header">
<h1><a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>"><?php bloginfo('name');?></a></h1>
<h2><?php bloginfo('description');?></h2>
<div id="search-tool-div">
<script type="text/javascript">
function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}
</script>
<form style="margin:0px;" method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>"><input style="margin:0px;" value="Search Here" onfocus="clearDefault(this)" name="s" type="text" class="search-top" id="s" size="25" /><input style="margin-left:5px;" type="submit" id="sidebarsubmit" value="Submit" class="submit-search" /></form>
</div>
</div>
<div id="navigation">
<ul>
<li <?php if(is_home()){echo 'class="current_page_item"';}?>><a href="<?php bloginfo('siteurl'); ?>/" title="Home">Home</a></li>
<?php wp_list_pages('title_li=&depth=1&'.$page_sort.'&'.$pages_to_exclude)?>
</ul>
</div>
<div id="container">
<div id="feedarea">
<div id="style-switch">
<a href="javascript:chooseStyle('none-theme', 60)"><img src="<?php bloginfo('stylesheet_directory');?>/img/red.gif" alt="Red Theme" border="0" /></a>
<a href="javascript:chooseStyle('green-theme', 60)"><img src="<?php bloginfo('stylesheet_directory');?>/img/green.gif" alt="Green Theme" border="0" /></a>
<a href="javascript:chooseStyle('blue-theme', 60)"><img src="<?php bloginfo('stylesheet_directory');?>/img/blue.gif" alt="Blue Theme" border="0" /></a>
</div>
<dl>
<dt style="padding-left:10px;"><strong>RSS Feeds:</strong></dt>
<dd><a href="<?php bloginfo('rss2_url'); ?>">Posts</a></dd>
<dd><a href="<?php bloginfo('comments_rss2_url'); ?>">Comments</a></dd>
</dl>
</div>فه رموو:
header.php
جاكم كرد
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<meta name="keywords" content="<?php bloginfo('description'); ?>" />
<meta name="description" content="<?pginfo('stylesheet_directory');?>/style.css" type="text/css" media="screen" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="green-theme" href="<?php bloginfo('stylesheet_directory');?>/style2.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="<?php bloginfo('stylesheet_directory');?>/style3.css" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory');?>/style-switch.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory');?>/top.js"></script>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php
global $page_sort;
if(get_settings('bluecharm_sortpages')!='')
{
$page_sort = 'sort_column='. get_settings('bluecharm_sortpages');
}
global $pages_to_exclude;
if(get_settings('bluecharm_excludepages')!='')
{
$pages_to_exclude = 'exclude='. get_settings('bluecharm_excludepages');
}
?>
<?php wp_head(); ?>
</head>
<body id="section-index">
<div id="header">
<h1><a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>"><?php bloginfo('name');?></a></h1>
<h2><?php bloginfo('description');?></h2>
<div id="search-tool-div">
<script type="text/javascript">
function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}
</script>
<form style="margin:0px;" method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>"><input style="margin:0px;" value="Search Here" onfocus="clearDefault(this)" name="s" type="text" class="search-top" id="s" size="25" /><input style="margin-left:5px;" type="submit" id="sidebarsubmit" value="Submit" class="submit-search" /></form>
</div>
</div>
<div id="navigation">
<ul>
<li <?php if(is_home()){echo 'class="current_page_item"';}?>><a href="<?php bloginfo('siteurl'); ?>/" title="Home">Home</a></li>
<?php wp_list_pages('title_li=&depth=1&'.$page_sort.'&'.$pages_to_exclude)?>
</ul>
</div>
<div id="container">
<div id="feedarea">
<div id="style-switch">
<a href="javascript:chooseStyle('none-theme', 60)"><img src="<?php bloginfo('stylesheet_directory');?>/img/red.gif" alt="Red Theme" border="0" /></a>
<a href="javascript:chooseStyle('green-theme', 60)"><img src="<?php bloginfo('stylesheet_directory');?>/img/green.gif" alt="Green Theme" border="0" /></a>
<a href="javascript:chooseStyle('blue-theme', 60)"><img src="<?php bloginfo('stylesheet_directory');?>/img/blue.gif" alt="Blue Theme" border="0" /></a>
</div>
</div>سایتەکەم ئیستا سپیە و هیج دیار نی یە.
لە بەریوەبەرایەتی دیارە لەدەرەوە سپی یە و هیج دیار نی یە
لە نێو header.php لە خوارەوەی پەڕەکە ئەو کۆدانە هەیە بیسڕەوە،
<dl> <dt style="padding-left:10px;"><strong>RSS Feeds:</strong></dt> <dd><a href="<?php bloginfo('rss2_url'); ?>">Posts</a></dd> <dd><a href="<?php bloginfo('comments_rss2_url'); ?>">Comments</a></dd> </dl>
تەنیا ئەو گۆڕانکارییە بکە، دەستکاری هیچی تر مەکە.
ئەوە لە نێو header.php ی تایبەت بە ڕووکارەکەت جێبەجێ بکە.
كاك كاسو منيش هه ر ئه وه لا بردووه نازانم بؤ كيشه ى بو دروست بووه!!!!!!!
پهڕه 1
دهبێت لە ژوورەوە بیت یان ببیت بە ئەندام بۆ ئهوهی بتوانیت وهڵام بنووسیت
مەکۆکانی وێبچن » WordPress » جۆن ئەمە لابەرم؟