blicht454
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Related postsThat did the trick! Thanks very much! I just added an arg to exclude a category, and now it’s working perfectly.
Here’s what worked if anyone else wants to use it:
<?php global $post; $nextTagThumb='-1'; $tags = wp_get_post_tags($post->ID); ?> <?php if ($tags) { $what_tag = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) ); $args = array( 'tag__in' => $what_tag, 'post__not_in' => array($post->ID), 'posts_per_page' => 6, 'ignore_sticky_posts' => 1, 'category__not_in' => 9 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <!-- CONTENT HERE --> <?php endwhile; } wp_reset_query(); $nextTagThumb = ($nextTagThumb+1); } ?>Forum: Fixing WordPress
In reply to: Related postsYeah, that’s a little better. Still unpredictable though.
If I have ‘posts_per_page’=>1, I’m still getting up to 4 or 5 related thumbs. And I just noticed that sometime I get the same related thumb twice.
Any ideas?
Forum: Fixing WordPress
In reply to: /blog/blog-post urlYeah, thanks. I already did, but I’m not finding the best way to make this work.
The permalinks structure is working great on all pages except for single blog posts. So I only want to change the structure for the posts, not anywhere else.
Any ideas?Forum: Fixing WordPress
In reply to: blog pagination problemBrilliant! Thanks so much. It’s working great now!
Forum: Fixing WordPress
In reply to: blog pagination problemYeah, that much I figured. Can you take a look at my code for the query and see if you notice anything strange? I’m not really customizing the loop all that much.
<?php query_posts('posts_per_page=3'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> ~the post is here~ <?php endwhile; ?> <div id="blog-nav"> <div id="older-posts"><?php next_posts_link('<span class="little-arrow-two-right"></span>older') ?></div> <div id="newer-posts"><?php previous_posts_link('<span class="little-arrow-two-left"></span>newer') ?></div> </div> <?php else : ?> <h2>Not Found</h2> <?php endif; ?>Forum: Fixing WordPress
In reply to: Add a class based on even or odd postGreat! Thanks for your help!
Forum: Fixing WordPress
In reply to: Slideshow incompatibilityYeah, that took care of it. Thanks!
Forum: Fixing WordPress
In reply to: Dynamic menu highlighting with WordPress menusThanks, that helped.
.current-page-ancestor worked for the pages and .current_page_parent for the posts
The classes for the dynamic menus are written automatically, so I have no control over whether it uses hyphens or underscores. Maybe the dynamic menu isn’t the best idea.
Forum: Fixing WordPress
In reply to: Query posts optionsThe site is still not online, so unfortunately I can’t post a link yet. I’m building the theme from scratch.
Can you explain how a counter variable would work? I’ve never done that before.
What I’m trying to do is use query posts to find the first three (most recent) posts on the first pass, and then all other posts on the second pass…
Let me know if that makes sense.
Thanks, got it. The full php code wasn’t there, and I wasn’t familiar with how to properly write an echo.
Here it is, if anyone needs it later:
<?php echo do_shortcode('[FrontpageSlideshow]'); ?>Then you can use the options given when you customize the slideshow.
For example:
<?php echo do_shortcode('[FrontpageSlideshow fs_cats=12 fs_slides=28 fs_show_buttons=0 fs_show_prevnext_buttons=0 fs_main_width=600px fs_main_height=450px fs_slide_width=100% fs_buttons_width=0% fs_main_border_color= fs_orderby=rand fs_show_comment=0 fs_rounded=0 fs_template=default]'); ?>Thanks jeff
Forum: Themes and Templates
In reply to: Create an id="current" on the blog pageAmazing! You’re a legend, thanks. That works perfectly.
Forum: Themes and Templates
In reply to: Create an id="current" on the blog pageAh, forget the second part of my question, figured it out using an array. And for the first part, if I set up the code like this:
<?php if (is_page()){ echo " id=\"current\""; }?>>Then the blog page is always current, unless I’m on the blog page…
Forum: Themes and Templates
In reply to: Create an id="current" on the blog pageThe blog page is not set as the front page, it’s set as the “posts” page. Any ideas?
I’m not using the wp_nav_menu, although I suppose I could, if there’s no other way to make this work. Here’s a link to the site, if it helps: blichttesting.com/one
You can see that right now the ‘blog’ is always current, since I haven’t figured it out yet.
Another question if you have the time: is there a way to make the id=current valid for more than one page?
<?php if (is_page('Home')) { echo " id=\"current\""; }?>>For example, in the code above, could I make more than just ‘Home’ current?
Forum: Fixing WordPress
In reply to: Creating an id="current" for the blog pageCorrection: The blog page is NOT being recognized as a page.