frankfolk
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Editing search results.I’ve said that i don’t want to do that, but i can see i’m going to have to. Thanks anyway.
Forum: Themes and Templates
In reply to: String Replace.Right, i have amended someone else’s code and i believe this should work.
function replace_content($content) { $content = str_replace('/n', '<p></p>',$content); return $content; } add_filter('the_content','replace_content');Forum: Themes and Templates
In reply to: Editing search results.yes, but since the current loop does everything i want other than allowing me to style it i’d prefer to keep it’s current functionality. I’m just looking for where in the loop i can append a div around each result.
Forum: Themes and Templates
In reply to: Editing search results.get_template_part( ‘loop’, ‘search’ );
Forum: Themes and Templates
In reply to: Editing search results.I am using a theme called starkers which is essentially a empty theme. So i have been coding it from the ground up. That wont do me any good because currently all the search.php does is call in the search function from the loop.
Forum: Themes and Templates
In reply to: In single.php list other articles in this categoryBrilliant. As soon as i used get_the_date() instead of the_date() it worked fine.
my bad for being too inpatient to read the text hha.
Forum: Themes and Templates
In reply to: In single.php list other articles in this categoryThis is what i have now. And it works. But still struggling to incorporate the date. It only does it for the first entry in the loop.
<ul> <?php foreach((get_the_category($post->ID)) as $category) { ?> <?php $catVal = $category->cat_ID; } $IDOutsideLoop = $post->ID; global $post; $myposts = get_posts('category='.$catVal.'&numberposts=999&order=ASC'); foreach ($myposts as $post) { ?> <li<?php if($IDOutsideLoop == $post->ID) { echo " class=\"current\""; } ?>> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <p> <?php the_date(); ?> </p> <?php }; ?> </ul>