موقع اكواد الوردبرٌس
hhttp://codex.wordpress.org/
اسماء الصفحات
الصفحة الرئٌسٌةindex.php الهٌدرheader.php الساٌدبارsidebar.php الفوترfooter.php التدوٌنةsingle.php الصفحةpage.php التعلٌقاتcomments.php -صفحة البحثsearch.php نموذج البحثsearchform.php صفحة االرشٌفarchive.php -صحفة االقسامcategory.php -صفحة االوسمةtag.php صفحة الخطأ404.php -
222×033 الصور المصغره للثٌم تكون
screenshot.png و اسمها
Style.css
البداٌة تكون بالكود التالى
*/
Theme name: khaled theme
Theme URI: http://www.khaledsamir.com
'Description: 'first theme
Tags: simple desigen
Author: khaled samir
Author URI: http://www.khaledsamir.com
Version: 1
/*
اكواد االندكس
>?;)(php get_header?<
>?;)(php get_sidebar?<
>?;)(php get_footer?<
كود نهاٌة الفوتر
>? ;)(php wp_footer?<
كود الهٌد
<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<
meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; <
>/ ">? ;)'charset=<?php bloginfo('charset
>/ ">? ;)'meta name="generator" content="WordPress <?php bloginfo('version<
>/ "meta http-equiv="Content-Type" content="text/html; charset=UTF-8<
>title><?php bloginfo('name'); ?> <?php wp_title(); ?></title<
>/ ">? ;)'link rel="pingback" href="<?php bloginfo('pingback url<
link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php <
>/ ">? ;)'bloginfo('rss2_url
link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" <
>/ "media="screen
>/ "link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico<
كود مسار الثٌم
<?php bloginfo('template_directory'); ?>
كود نهاٌة الهٌد
>? ;)(php wp_head?<
الساٌد بار
كود استدعاء الوٌد جٌت فى ملف الساٌد بار
php?<
: ))(if(!function_exists('dynamic_sidebar')|| !dynamic_sidebar
>?
>p>you are not use sidebar widget</p<
>? ;php endif?<
كود انشاء الوٌد جٌت فى ملف فانكشنز
php?<
))'if(function_exists('register_sidebar
(register_sidebar(array
,' ' => 'القائمة الٌمنىname'
,'>"before_widget' => '<div class="widget'
,'>--after_widget' => '</div><!--End widget-cont--></div><!--End widget'
,'>before_title' => '<h2'
,'>"after_title' => '</h2><div class="widget-cont'
;))
{
;)(register_sidebar
}
>?
كود الغاء شرٌط االدمن
show_admin_bar(false); // to disable admin bar @3.1 //
استدعاء الجً كوٌري
>? ;)'php wp_enqueue_script('jquery?<
كود رابط الرئٌسٌة
a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php <
echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo(
>'name' ); ?></a
كود وصف الموقع
>? ;) 'php bloginfo( 'description?<
li كود صفحات الموقع
<?php wp_list_pages('title_li='); ?>
كود لٌنك الرئٌسٌة
>? ;) ) '/' (php echo esc_url( home_url?<
كود االقسام
<?php wp_list_cats('title_li='); ?>
كود المٌنو داخل لوحة التحكم
فى ملف العرض
<?php wp_page_menu($args); ?>
فى ملف الفانكشنز
(args = array$
,''menu_order, post_title
,''menu
>=
'include'
,''
>=
'exclude'
=> echo''
,false
,''
''
sort_column' '
=> menu_class''
,''
,true
=>
=> show_home''
>= 'link_before'
>=
'link_after'
;)
اللوب
كود اللوب فارغ
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
الكود الخاص بالتدوٌنة//
<?php endwhile; ?>
<?php else : ?>
<p>Not found</p>
<?php endif; ?>
شرح مابداخل كود اللوب
المحتوى وزر المزٌد
>?;)'php the_content('more?<
القسم او تصنٌف الموضوع
>? ;)' ,'(php the_category?<
لٌنك التدوٌنة
>">? ;)(a href="<?php the_permalink<
عنوان التدوٌنه
>? ;)(php the_title?<
لٌنك التدوٌنه بالعنوان
>a href="<?php the_permalink(); ?>"><?php the_title(); ?></a<
كاتب الموضوع مع اللٌنك اذا كان
موقع الكاتب
>? ;)(php the_author_link?<
>?;)(php the_author?< الكاتب
>? ;)'php the_time('d M Y?< التارٌخ كامل
>? ;)''(php the_tags?< االوسمة
>? ;) '%' ,php comments_number( 0, 1?< عدد التعلٌقات
>? ;)(php comments_link?< لٌنك التعلٌقات
الصفحات التالٌه والصفحات السابقه
<?php previous_posts_link(); ?>
||
<?php next_posts_link(); ?>
الصوره المصغرة
;) 'add_theme_support( 'post-thumbnails
{ ) ) 'if ( function_exists( 'add_theme_support
;) 'add_theme_support( 'post-thumbnails
;) set_post_thumbnail_size( 609, 173, true
}
كود الصورة البارزة او
استدعاء الصوره المصغره فى اللوب
>? ;)(php echo get_the_post_thumbnail?<
السٌرش
Search form
Search.php و انشاء ملف
>">? ;)'form method="get" id="searchform" action="<?php bloginfo('url<
>/ >?;)(input type="text" name="s" id="s" size="15" <?php the_search_query<
>/ "input id="button" type="submit" value="Find<
>form/<
الفوتر
فى ملف فانكشنز
(register_sidebar(array
,'name' => 'footer'
,'' >= 'before_widget'
,'' >= 'after_widget'
,'' >= 'before_title'
,'' >= 'after_title'
;))
فى ملف الفوتر
php?<
: ))'if(!function_exists('dynamic_sidebar')|| !dynamic_sidebar('footer
>?
>p>you are not use sidebar widget</p<
>? ;php endif?<
© Copyright 2026