สองสามวันมานี้ เหนื่อยกับ WordPress ซะจริงๆ

เริ่มโดย JicKaro, 29 กันยายน 2008, 01:00:34

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

JicKaro

มีเว็ป Gallery อยู่ดีๆ ไม่เอา ดันไปลบทิ้งซะมาทำ WordPress เป็นงัยละทีนี้ เหมือนบ้านนอกเข้ากรุงเลย เฮ่อ..เหนื่อย  :Pกับมันจริงๆ ไม่ว่าจะเป็นการเปลี่ยนเทมเพลท ลงกี่ตัวติด Error หมด มันเป็นไรของมันหว่า.. แต่ตอนนี้ได้เทมเพลทถูกใจแล้วล่ะ แต่ยังขาดก็แต่การจัดวางตำแหน่งต่างของคอลั่ม Featured Category

เอาเป็นว่าผมต้องการแก้ไขเหมือนที่ผมร่างในรูปนี้อ่ะครับ



ใครที่มีความรู้ความชำนาญเกี่ยวกับ WordPress ช่วยผมทีเถอะครับ  :-*

หรือจะสอนผมผ่าน MSN ก็ได้ครับ ถ้าพี่ๆ จะกรุณา

MSN : jickaro[at]hotmail.com

นี่เป็นบล็อกเจ้าปัญหาของผม
[linkpr]http://jphotostyle.com/[/linkpr]
It's difficult not impossible.
ก็แค่ยาก แต่..ไม่ใช่เป็นไปไม่ได้
## Code: JUST1CENTHOSTGATOR คูปองเช่าโฮสเกเตอร์ $0.01 เดือนแรก ##

JicKaro

โค้ดในไฟล์ home.php เผื่อพี่ๆ ต้องใช้ในการแก้ไขให้ผม

อ้างถึง<?php get_header(); ?>

<div id="content">

   <div id="homepage">
   
      <div id="homepagetop">
      
         <div class="hptabber">

            <!--This section is where the Featured Content plugin is called.-->
            
            <?php include (ABSPATH . '/wp-content/plugins/content-gallery/gallery.php'); ?>
         
         </div>
         
      </div>
               
      <div id="homepageleft">
      
         <!--This section is currently pulling category ID #1, and can be switched by changing the cat=1 to show whatever category ID you would like in this area.-->
            
         <div class="featured">
         <h3>บทความล่าสุด</h3>
         
            <!--This is where the thumbnails are found for the homepage bottom section - note the custom field name for this image is "thumbnail". Recommended image size is 70x70, as the stylesheet is written for this size.-->
         
            <?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
            <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
                <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
            <?php else: ?>
                  <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;"  src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
            <?php endif; ?>            
            <b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
            <?php the_content_limit(80, ""); ?>
            
            <div style="border-bottom:1px dotted #94B1DF; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>
            
            <?php endwhile; ?>

            <!--This is where you can specify the archive link for each section. Replace the # with the appropriate URL-->
            
            <b><a href="#" rel="bookmark">Read More Posts From This Category</a></b>
            
         </div>         
            
      </div>
      
      <div id="homepageright">
      
         <!--This section is currently pulling category ID #1, and can be switched by changing the cat=1 to show whatever category ID you would like in this area.-->
      
         <div class="featured">
         <h3>Featured Category</h3>
         
            <!--This is where the thumbnails are found for the homepage bottom section - note the custom field name for this image is "thumbnail". Recommended image size is 70x70, as the stylesheet is written for this size.-->
         
            <?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
            <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
                <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
            <?php else: ?>
                  <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;"  src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
            <?php endif; ?>            
            <b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>            
            <?php the_content_limit(80, ""); ?>
                        
            <div style="border-bottom:1px dotted #94B1DF; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>
            
            <?php endwhile; ?>
            
            <!--This is where you can specify the archive link for each section. Replace the # with the appropriate URL-->
            
            <b><a href="#" rel="bookmark">Read More Posts From This Category</a></b>
            
         </div>      
         
      </div>
      
      <div id="homepagebottom">
      
         <div class="hpbottom">
         
            <h3>Featured Category</h3>
   
            <!--This is where the thumbnails are found for the homepage bottom section - note the custom field name for this image is "hpbottom". Recommended image size is 70x70, as the stylesheet is written for this size.-->
            
            <?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
            <?php if( get_post_meta($post->ID, "hpbottom", true) ): ?>
                <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "hpbottom", true); ?>" alt="<?php the_title(); ?>" /></a>
            <?php else: ?>
                  <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;"  src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
            <?php endif; ?>            
            <b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
            <?php the_content_limit(350, "[Read more of this review]"); ?>
               
            <div style="border-bottom:1px dotted #2255AA; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>
               
            <?php endwhile; ?>
   
            <!--This is where you can specify the archive link for each section. Replace the # with the appropriate URL-->
               
            <b><a href="#" rel="bookmark">Read More Posts From This Category</a></b>
         
         </div>
      
      </div>
      
   </div>
   
<?php include(TEMPLATEPATH."/sidebar_home.php");?>
      
</div>

<!-- The main column ends  -->

<?php get_footer(); ?>
It's difficult not impossible.
ก็แค่ยาก แต่..ไม่ใช่เป็นไปไม่ได้
## Code: JUST1CENTHOSTGATOR คูปองเช่าโฮสเกเตอร์ $0.01 เดือนแรก ##

siamman

("cat=1&showposts=3");

cat = หมวดเนื้อหาหรือแคตาล๊อก เข้าไปดูว่าหมวดเนื้อหาอยู่ id ใหนได้ใน admin
showposts= จำนวนที่จะแสดงเนื้อหาล่าสุดของหมวดนั้นๆ

oeshi

สำหรับ Themes นี้

จะแก้ ที่ home.php

แต่ละ featured มันสามารถ เปลี่ยน id ของ Category  ได้ ครับ  ต่อจาก id category จะเป็น จำนวนของ title ที่จะเอามา ลิส ใส่ได้เลย  เท่าไหร่ ก็ใส่ไป

ซึ่ง มันจะมี left กับ right

ถ้าเรา มี หลาย Category ใ่ห้ Copy featured ตัวอย่าง นั้น ลงไป ต่อกันได้่เลย แล้ว เปลี่ยน ID  เอา

ด้านลาง สุด มันเป็น bottom  ก็ทำ คล้ายๆ กัน


ตีม นี้ ทำมาให้ แก้ไข ง่ายๆ เลย ครับ แต่ต้อง เข้าใจ เรื่อง Block ของ แต่ ละ DIV  อะ ครับ จะไม่งง

มีไร ก็ถามได้ ครับ ....

oeshi[az]live.com MSN

ขออภัย ไม่ได้ Add  ไป พอดี ออน ไม่ไ้ด้

iPhoenix

เล่นตั้งกระทู้ซะดึกเลย

ไม่งั้นจะงมให้อยู่แหละครับ

พอดีพรุ่งนี้มีเรียนเลยต้องรีบนอน ไงถ้าพร่งนี้ยังไม่ได้จะมางมให้ครับ

JicKaro

ขอบคุณทุกคนมากครับที่ให้คำแนะนำ โดยเฉพาะคุณ oeshi ทำให้ผมเข้าใจอะไรหลายๆ อย่าง

เด๋วผมจะลองไปปรับแต่งดูนะครับ  :'(
It's difficult not impossible.
ก็แค่ยาก แต่..ไม่ใช่เป็นไปไม่ได้
## Code: JUST1CENTHOSTGATOR คูปองเช่าโฮสเกเตอร์ $0.01 เดือนแรก ##

micro

อยากทำwordpress เป็นจิงๆ ทำบล๊อคแล้วชอบโดนหาว่าแสปมทุกที  มะรู้ยากไหมหนอ :P

Kamilia

เวปสวยออก ทำยังไงถึงจะทำได้แบบนี้บ้างนะ

โห ปรับมาสามวันแล้วยังไม่ได้อะไรเลย  กลุ้มใจมากกกกกกกกกกก :-X