kz
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Posts in three columns<?php $col = 0; $col_count = 3; $cols = array(); while (have_posts()) : the_post(); if($col >= $col_count) $col = 0; ob_start(); ?> <div class="post" id="post-'<?php the_ID(); ?>'"> <h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1> <div class="descr"><?php the_time('l, F jS Y, G:i a T'); ?></div> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <?php $output = ob_get_contents(); ob_end_clean(); $cols[$col++] .= $output; endwhile; ?> <div class="columns"> <?php foreach($cols as $key => $col) echo '<div class="column column' . $key . '">' . $col . '</div>'; ?> </div>style.css
.columns{ overflow:hidden; zoom:1 /* ie6 */ } .columns .column{ float:left; width:33%; }Forum: Developing with WordPress
In reply to: Display sub cat when u select a catIf you mean category archives,
create category.php file and edit like below:<ul> <?php wp_list_categories('title_li=&child_of=' . get_query_var('cat')); ?> </ul>Forum: Plugins
In reply to: Syntax for using do_shortcode function<?php echo do_shortcode('[eshop_addtocart]'); ?>Forum: Themes and Templates
In reply to: Changing Location of Blog NameAdd below rules in style.css.
.top h1{position:relative;} .top h1 a{ position:absolute; left:20px; top:10px; }Replace left and top value with position you want.
Forum: Themes and Templates
In reply to: Get ‘Alternate Text’ from attachmentsIf ‘_wp_attachment_image_alt’ is not set,
echo $alt;shows text like ‘Array()’.Forum: Themes and Templates
In reply to: Posts in three columns<table cellpadding="10" cellspacing="10" border="0"> <?php $col = 0; $cols_per_row = 3; while (have_posts()) : the_post(); if($col == 0) echo '<tr>'; ?> <td class="column'<?php echo $col; ?>" style="vertical-align: top"> <div class="post" id="post-'<?php the_ID(); ?>'"> <h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1> <div class="descr"><?php the_time('l, F jS Y, G:i a T'); ?></div> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <td> <?php if($col++ >= $cols_per_row){ $col = 0; echo '</tr>'; } endwhile; ?> </table>Forum: Themes and Templates
In reply to: Make foot go across entire page instead of c1Your page structure is:
body #wrap #c1 #book #buttons #copy #footer #c2 #sidebar#footer is included in #c1, so its width is 269px as same as #c1’s width.
If you wanto to make footer go across entire page,
change the page structure like:body #wrap #c1 #book #buttons #copy #c2 #sidebar #footerand add rule in style.css:
#footer{clear:both;}Forum: Themes and Templates
In reply to: Porting a ThemeAdd this in function.php:
function the_selected(){ echo ' <li class="selected_page"> <div class="selected"> <div class="selected_left"></div> <div class="selected_middle"> <a HREF="about-2520us.html">About us</a> </div> <div class="selected_right"></div> </div> </li>'; }In your menu.php
<ul class="main_menu"> <li><a class="homepage" HREF="<?php bloginfo('url'); "></a></li> <?php if(is_home()) the_selected(); ?> <li><a HREF="<?php echo get_permalink(1) ?>">Work</a></li> <?php if(is_page('1')) the_selected(); ?> <li><a HREF="<?php echo get_permalink(2) ?>">Services</a></li> <?php if(is_page('2')) the_selected(); ?> <li><a HREF="<?php echo get_permalink(3) ?>">Contact</a></li> <?php if(is_page('3')) the_selected(); ?> </ul>Replace the numbers (1, 2, 3) with each page ID.
Forum: Themes and Templates
In reply to: Centre Title & Tag line – Atahualpa ThemeAdd css rules in your style.css
div.post-headline h2, div.post-footer{text-align:center;}Forum: Themes and Templates
In reply to: Background-imagePls show your site URL.
Forum: Themes and Templates
In reply to: Odd dashes in my theme’s sidebarPls show your site URL or PHP code.
Forum: Fixing WordPress
In reply to: Next Post/Previous Post ProblemIn single.php use next_post_link and previous_post_link
next_post_link(‘%link’, ‘« Older Articles’)
previous_post_link(‘%link’, ‘Newer Articles »’)query_posts('cat=123&showposts=1'); // replace 123 by category ID of "Headline" if(have_posts()) : the_post(); $images = get_children(array( 'post_parent' => get_the_id(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'ID', 'order' => 'ASC', 'numberposts' => 1 )); foreach((array)$images as $key => $image){ echo wp_get_attachment_image($key); } the_excerpt(); endif; wp_reset_query();Forum: Themes and Templates
In reply to: Archives Navigation Link Not Working in Depo Masthead Themehttp://www.catalytica.biz/360salon/?m=2010 works.
Your permalink setting is default.
You must set permalink to %postname%Forum: Themes and Templates
In reply to: how to remove this block from posts?Character | in the source of that page is the forward slash.
<div class="PostHeaderIcons metadata-icons"> | </div>