sazuka
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Strip html codes from PostsActually because People are allowed to register on my wordpress and make guest posts and i want to stop them from adding some wierd html codes including iframe forms etc…
Is there no way to make it auto strip it inside the database with a plugin.. I just wasnt able to find such a plugin yet..
Forum: Themes and Templates
In reply to: Remove Li TagI am kinda stuck with
<?php wp_get_archives('type=postbypost&limit=20&format=custom'); ?>It doesnt make any br tags inbetween.. It simply lines them up…
Forum: Themes and Templates
In reply to: Remove Li TagIs it some global code which auto ads a li tag or is it bound to the custom template`?
Forum: Themes and Templates
In reply to: Putting php code inside php codeAnother enhanced question to my problem.
My code shows the latest posts of category X in my sidebar.
Now I wanted to add a second box showing category Y posts under it.So i put it in between my
(is_single('2466')){code.Original code:
<?php if (is_single('2466')){ query_posts($query_string . '&cat=1&category__not_in=3'); if(have_posts()) : while(have_posts()) : the_post(); ?> <br><div id="twitter"> <h2>Latest Articles</h2> <ul id="twitter_update_list"></ul> <br/> <div class="entry2"> <div class="post" id="post-<?php the_ID(); ?>"> <b><a href="<?php the_permalink() ?>" rel="bookmark" title="Read the rest of <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </b> <span class="content"> <?php the_excerpt(); ?> </span> <div class="clearfloat"></div> <?php edit_post_link('edit', '', ''); ?> <div class="allinfos"> </div> </div> </div> <?php endwhile; ?> <div style="padding:10px;"><!-- page navi --> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> <!-- page navi end --></div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> </div> <?php endif; } ?>——————————–
Now I add the second box and recieve this errorParse error: syntax error, unexpected T_ENDWHILE in /var/customer/webs/side/wp-content/themes/Dig/sidebar.php on line 63Here is how I did it:
<?php if (is_single('2466')){ query_posts($query_string . '&cat=1&category__not_in=3'); if(have_posts()) : while(have_posts()) : the_post(); ?> <br><div id="twitter"> <h2>Latest Articles</h2> <ul id="twitter_update_list"></ul> <br/> <div class="entry2"> <div class="post" id="post-<?php the_ID(); ?>"> <b><a href="<?php the_permalink() ?>" rel="bookmark" title="Read the rest of <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </b> <span class="content"> <?php the_excerpt(); ?> </span> <div class="clearfloat"></div> <?php edit_post_link('edit', '', ''); ?> <div class="allinfos"> </div> </div> </div> <?php endwhile; ?> <div style="padding:10px;"><!-- page navi --> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> <!-- page navi end --></div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> </div> query_posts($query_string . '&cat=1&category__not_in=3'); if(have_posts()) : while(have_posts()) : the_post(); ?> <div id="twitter"> <h2>Latest Articles</h2> <ul id="twitter_update_list"></ul> <br/> <div class="entry2"> <div class="post" id="post-<?php the_ID(); ?>"> <b><a href="<?php the_permalink() ?>" rel="bookmark" title="Read the rest of <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </b> <span class="content"> <?php the_excerpt(); ?> </span> <div class="clearfloat"></div> <?php edit_post_link('edit', '', ''); ?> <div class="allinfos"> </div> </div> </div> <?php endwhile; ?> <div style="padding:10px;"><!-- page navi --> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> <!-- page navi end --></div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> </div> <?php endif; } ?>Forum: Themes and Templates
In reply to: Putting php code inside php codethx, actually the one before ur last post worked but only if u remove the global $query_string;
I dont know why, but if u remove it no more errors.. kinda wierd
Forum: Themes and Templates
In reply to: Putting php code inside php codethx but i recieve:
Warning: implode() [function.implode]: Invalid arguments passed in /var/customers/webs/side/wp-includes/query.php on line 1907Forum: Themes and Templates
In reply to: Putting php code inside php codeParse error: syntax error, unexpected ‘<‘
I think im doing a newbie mistake…This is how I put the code inside:
<? if (is_single('2466')){ query_posts($query_string . '&cat=72'); <div id="twitter"> <h2>Latest Articles</h2> <ul id="twitter_update_list"></ul> <br/> <?php if(have_posts()) : while(have_posts()) : the_post('exclude=3'); ?> <div class="entry2"> <div class="post" id="post-<?php the_ID(); ?>"> <b><a href="<?php the_permalink() ?>" rel="bookmark" title="Read the rest of <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </b> <span class="content"> <?php the_excerpt(); ?> </span> <div class="clearfloat"></div> <?php edit_post_link('edit', '', ''); ?> <div class="allinfos"> </div> </div> </div> <?php endwhile; ?> <div style="padding:10px;"><!-- page navi --> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> <!-- page navi end --></div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> </div> }Forum: Themes and Templates
In reply to: Syntax error on conditionalThis doesnt work for me :/
<? if (is_home() || is_front_page()) {
It just skips this if clause whenever i try to refresh my home/front page
Forum: Themes and Templates
In reply to: Syntax error on conditionalI continued to work on it and now there is no error but it always jumps to the last else{ on main page.
<? if (is_home() || is_front_page() ) { query_posts($query_string . '&cat=4'); } else if (is_single('2466')){ query_posts($query_string . '&cat=72'); } else { query_posts($query_string . '&cat=4'); } ?>Forum: Plugins
In reply to: Last 5 Posts by author and related entries/poststhanks, but is there a new updated version which works with wordpress 2.3?
Forum: Plugins
In reply to: Google Sitemaps and WordPress 2.3 (Please help testing)about the sitemap .xml , do i have to link from my blog to the .xml file so searchengines can see it? or its no need to link to it?
Forum: Fixing WordPress
In reply to: Date modificationhmm, i guess i described my problem wrong. I want that it will show the date like this: “February 13th, 2007”
The nifty part is how the script will decide if it should add “th”, “st” or “rd” behind the day date.
Forum: Fixing WordPress
In reply to: Date modificationThe problem is showing the “rd” “st” “th” behind the day date..
Forum: Fixing WordPress
In reply to: Posts become snippets with a Read the rest link belowthank you for your Help !