formica
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Bold first post title in categoryFor the record found a way of outputting the result using a counter in php, thanks all:
https://www.ads-software.com/support/topic/bold-up-first-result-of-loop
Forum: Hacks
In reply to: bold up first result of loopThanks Mark!
That was exactly what I was looking for – much appreciated.
for the record here’s the code I ended with:
<?php $i = 0; if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php $i++; ?> <?php if( 1 == $i ) { ?> <li class="current"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> <?php } else { ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li> <?php } ?> <?php endwhile; ?>
Also found a way of doing using css2 though browser support is still a bit behind thanks to Curtiss for this one:
https://www.ads-software.com/support/topic/bold-first-post-title-in-category
Forum: Fixing WordPress
In reply to: Bold first post title in categoryHi Curtis
That worked perfectly! Thanks very much. I never knew that class existed.
Fingers crossed ie6 disappears soon. But just in case anyone knows any other solutions, please let me know.
Thanks again!
Forum: Fixing WordPress
In reply to: listing category posts dynamicallyHi Alchymyth
Thanks for your help. Unfortunately I seem to be going backwards and getting confused. I couldn’t seem to make it work and so have found other code which at it’s core seems to do a better job but I need to set up a conditional tag to execute the code – or not – according to it’s parent category.
The basic code i got from here:
but they never posted the final code to stop duplication of the posts on the category page and my conditional code seems to send it in an infite loop.
Anyway here’s my code if someone could take a look i’d hugely appreciate it:
Forum: Hacks
In reply to: Infinte loop problemDoh!
Sorry solved it myself. Was simply missing off the:
<?php wp_reset_query(); ?>
Thanks. I had the same problem. Simply reinstating the permalinks fixed it.
Forum: Fixing WordPress
In reply to: Direct link to first post in categoryUntested but give this a try…
<?php $postslist = get_posts('category=5&numberposts=1&order=DESC&orderby=post_date'); foreach ($postslist as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink() ?>">Work</a></li> <?php endforeach; ?>
Forum: Fixing WordPress
In reply to: Displaying custom fields and thumbnails of posts in categoryesmi I love you.
Not really, but it worked using:
$customField = get_post_custom_values('blue_title', ($single->ID));
Thanks much appreciated!
Forum: Fixing WordPress
In reply to: Possible to Re-Use Magic Fields?Thanks apljdi that worked!
Forum: Fixing WordPress
In reply to: GD Star rating shortcodeThanks for replying, but still no luck….
Forum: Fixing WordPress
In reply to: Rusty php queryCor blimey! just solved my own problem. Wonders will never cease.
Thanks anyway guys:
<?php $result = "<ul class='lcp_catlist'>"; $catposts = get_posts('this_months_news='.$ID."&numberposts=".$NUMBEROFPOSTS); foreach($catposts as $single): $result .= "<li><a href='"; $result .=get_permalink($single->ID)."'>".$single->post_title."'<img src='".p75GetThumbnail($single->ID, 110, 110)."' /></a></li>"; endforeach; $result .= "</ul>"; echo $result; ?>
Forum: Fixing WordPress
In reply to: Simple Post Thumbnails not showingThanks Orenshmu i’ll take a look.
Forum: Fixing WordPress
In reply to: wp_list_pages syntax questionThanks for replying and poiinting me in the right direction. I’m pulling my hair out with what seems like a simple idea.
If i have any luck i’ll post it, I’ve seen a few people with the same issue.
Forum: Fixing WordPress
In reply to: wp_list_pages syntax questionPhew Thanks for replying,
Sorry as I said my php is rusty, so not sure what you mean. In the sidebar.php i’m using…
<?php wp_list_pages ('child_of=31&sort_column=post_title&title_li='); ?>
to display my list of child pages, do you mean leave claases.php alone and alter this using
echo=0
somehow to display the custom fields thumbs?Any futher help would be greatly appreciated t310s, I’m really struggling here.
Forum: Fixing WordPress
In reply to: wp_list_pages syntax questionAnyone?