oussama wari نشر 17 أغسطس 2017 أرسل تقرير مشاركة نشر 17 أغسطس 2017 السلام عليكم و رحمة الله تعالى و بركاته أنا أقوم حاليا ببرمجة قالب ووردبريس . انتهيت من تصميم القالب ب html بالفعل و كذلك تقسيمه ليصبح مكون ب php . لكن لدي مشكلة في ملف single.php لا أدري ما السبب لكنه لا يعمل مهما حاولت . هذا هو كود الملف : <?php get_header(); ?> <div class="container"> <div class="homebody"> <div class="container-fluid"> <div class="postspages"> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <div class="showsingle"> <div class="row"> <div class="col-md-12 titlepos"> <div class="single-title"><?php the_title(); ?></div> <div class="post-meta"> <span><i class="fa fa-user-circle"></i> نشرت بواسطة:<?php the_author_posts_link(); ?></span> <span><i class="fa fa-calendar"></i> <?php the_date( 'Y/m/d' ); ?></span> <span><i class="fa fa-eye"></i> <?php echo getPostViews(get_the_ID()); ?> مشاهدة</span> <span><i class="fa fa-comment"></i> عدد التعليقات : <?php comments_popup_link('0', '1', '%'); ?></span> <span><i class="fa fa-external-link"></i> <a href="https://www.tlabna.net/tollabna/%d8%a7%d9%84%d8%a7%d9%82%d8%b3%d8%a7%d9%85-%d8%a7%d9%84%d9%85%d8%b3%d8%a7%d9%86%d8%af%d9%87/%d8%a7%d8%ae%d8%a8%d8%a7%d8%b1-%d9%88%d9%86%d8%aa%d8%a7%d8%a6%d8%ac" rel="category tag">اخبار ونتائج</a></span> </div> </div> <div class="col-md-12 content"> <?php the_content(); ?> </div> </div> </div> <?php endwhile; ?> <?php endif; ?> <div class="postssa"> <div class="row"> <div class="col-md-12 comments"> <?php comments_template(); ?> </div> </div> </div> </div> </div> </div> </div> <?php get_footer(); ?> و هذا كود ملف functions.php هل من الممكن أن يكون المشكل أو الخلل منه ما رأيكم ؟؟ <?php if(function_exists('add_theme_support')) add_theme_support('post-thumbnails'); add_image_size( 'logo', 400, 175 ); add_theme_support( 'custom-logo', array( 'size' => 'logo' ) ); function do_html_title($page_title){ $title = $page_title. ' | Oussama Testing site'; return $title; }; function new_excerpt_length($length) { return 200; } add_filter('excerpt_length', 'new_excerpt_length'); function register_my_menus(){ register_nav_menus( array( 'navbar' => __( 'التصنيفات' ), ) ); } add_action( 'init', 'register_my_menus' ); function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return "0 View"; } return $count.'مشاهدة'; } function setPostViews($postID) { $count_key = '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); } } function wp_bs_pagination($pages = '', $range = 4) { $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 '<div class="text-center">'; echo '<nav><ul class="pagination"><li class="disabled hidden-xs"><span><span aria-hidden="true">Page '.$paged.' of '.$pages.'</span></span></li>'; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<li><a href='".get_pagenum_link(1)."' aria-label='First'>«<span class='hidden-xs'> First</span></a></li>"; if($paged > 1 && $showitems < $pages) echo "<li><a href='".get_pagenum_link($paged - 1)."' aria-label='Previous'>‹<span class='hidden-xs'> Previous</span></a></li>"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "<li class=\"active\"><span>".$i." <span class=\"sr-only\">(current)</span></span> </li>":"<li><a href='".get_pagenum_link($i)."'>".$i."</a></li>"; } } if ($paged < $pages && $showitems < $pages) echo "<li><a href=\"".get_pagenum_link($paged + 1)."\" aria-label='Next'><span class='hidden-xs'>Next </span>›</a></li>"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<li><a href='".get_pagenum_link($pages)."' aria-label='Last'><span class='hidden-xs'>Last </span>»</a></li>"; echo "</ul></nav>"; echo "</div>"; } } ?> اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
0 محمد بنرجب نشر 22 أغسطس 2017 أرسل تقرير مشاركة نشر 22 أغسطس 2017 يا أخي هل ملف ال single كله لا يعمل أم جزء منه راسلني للتواصل بشكل أفضل اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
0 mohamd emran نشر 12 سبتمبر 2017 أرسل تقرير مشاركة نشر 12 سبتمبر 2017 لمشكلة بسيطة تفقد ال ";" semicolon تحياتي , شكرا على وقتك. اقتباس رابط هذا التعليق شارك على الشبكات الإجتماعية More sharing options...
السؤال
oussama wari
السلام عليكم و رحمة الله تعالى و بركاته
أنا أقوم حاليا ببرمجة قالب ووردبريس . انتهيت من تصميم القالب ب html بالفعل و كذلك تقسيمه ليصبح مكون ب php .
لكن لدي مشكلة في ملف single.php لا أدري ما السبب لكنه لا يعمل مهما حاولت .
هذا هو كود الملف :
و هذا كود ملف functions.php هل من الممكن أن يكون المشكل أو الخلل منه ما رأيكم ؟؟
رابط هذا التعليق
شارك على الشبكات الإجتماعية
2 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.