wescrock
Forum Replies Created
-
Forum: Themes and Templates
In reply to: title and category filterSo, I got it to work! thank you for ALL your help. (because I hate it when people don’t post their solutions, the code I used is below.)
<div id="video_archive"> <h4>Featured Videos</h4> <?php $page_title = get_the_title(); $page_title = str_replace(" ", "_", $page_title); ?> <?php query_posts('category_name=' . $page_title . '&tag=Video+video&showposts=-1$orderby=date'); if (have_posts()) { echo '<ul class="list-cat">'; while (have_posts()) { the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> ?php } // end while loop echo '</ul>'; } // end if wp_reset_query(); ?> </div> <div id="photo_archive"> <h4>Featured Photos</h4> <?php query_posts('category_name=' . $page_title . '&tag=Gallery+gallery&showposts=-1$orderby=date'); if (have_posts()) { echo '<ul class="list-cat">'; while (have_posts()) { the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php } // end while loop echo '</ul>'; } // end if wp_reset_query(); ?> </div>Forum: Themes and Templates
In reply to: title and category filterstill no dice… What I may end up doing is just doing a separate template page for each speaker profile. this will be more reliable I believe.
I am going to work on that for a bit to get it to work… my only question is: will my filters work with 2 different categories like that? (where I am looking to compare 2 DIFFERENT categories in the same query statement?
Forum: Themes and Templates
In reply to: Using query_posts to show only latest 2 postsNo problem… I think I asked the same question about 6 months ago!
Forum: Themes and Templates
In reply to: title and category filterget_posts() didnt work, but I saw that it should be $category_name=… rather than just category_name=
I changed that, and it returned all results that are filed under that type (video or photo posts) but did not filter by the category_name (presenters name.)
Do you think the problem could lie with the ‘title_li’ part?
thanks,
WesForum: Themes and Templates
In reply to: title and category filterI changed the spelling… but still no dice. now, it displays no results.
Forum: Themes and Templates
In reply to: Using query_posts to show only latest 2 postsquery_posts('cat=-3&showposts=2');that should do the trick 😉
Forum: Themes and Templates
In reply to: Get posts based on page title?Hey there, I am so glad I found this, but i cant seem to get it to display the results… below is my code:
<div id="video_archive"> <h4>Featured Videos</h4> <?php $page_cat = $post->post_title; //copy the page title ?> <?php $page_cat = strtolower($page_cat); // make it lower case only?> <?php $my_query = new WP_Query('category_name='.$page_cat); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?><li> <?php echo $page_cat ?></li> </div>Forum: Themes and Templates
In reply to: Adding number of images of the media library in my templatesI believe there is a count function within wordpress…
otherwise, you could to a loop such as (this is concept… i am not fluent enough in PHP to write it out:}
$images_count=0 <– declares the integer as not having a value
While there are more images{;
$images_count++; <– increase ‘images’s value for each image not sure about the actual command for this in PHP
} <– ends while loop :pprint “there are” . $images_count . “images in the media library.”;
sorry I can’t be more specific 🙁
Forum: Plugins
In reply to: NextGen Gallery can’t uploadMy issue is that I do not see the option for Batch Upload… I just installed the plugin today.