tommysvr
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: Show Future Posts / Hide Published PostsSo I now have this, which successfully shows future posts on the taxonomy page. However, it still shows published posts as well. Anyone know of a way to modify this to hide published posts?
if ( !is_admin() ) : function __include_future( $query ) { if ( $query->is_tax() || $query->is_single() || $query->is_page() ) $GLOBALS[ 'wp_post_statuses' ][ 'future' ]->public = true; } add_filter( 'pre_get_posts', '__include_future' ); endif;
Forum: Fixing WordPress
In reply to: Listing Child & Sibling CategoriesHi,
It’s pretty straight forward – you could put that pretty much anywhere in the theme. The most likely spot would be in sidebar.php
I haven’t been able to look through that theme much and have never used it, so I’m not sure about the styling, but you could possibly just add this to the sidebar and see how it shows up:
<!--widget start --> <div id="categories" class="dbx-box suf-widget widget_categories"> <div class="dbx-content"> <h3 class="dbx-handle <?php echo $suf_sidebar_header;?>"><?php _e('Categories', 'suffusion'); ?></h3> <?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { wp_list_categories('hide_empty=0&title_li=&child_of=' . $this_category->cat_ID); } else { $parent = $this_category->category_parent; wp_list_categories('hide_empty=0&title_li=&child_of=' . $parent); } } ?> </div> </div> <!--widget end -->
Hope that helps somewhat.
Forum: Fixing WordPress
In reply to: if else Help for Article TitlesPerfect! Thank you very much! ??
Forum: Fixing WordPress
In reply to: Listing Child & Sibling CategoriesNevermind! This does the job exactly:
<?php if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != "") { wp_list_categories('hide_empty=0&title_li=&child_of=' . $this_category->cat_ID); } else { $parent = $this_category->category_parent; wp_list_categories('hide_empty=0&title_li=&child_of=' . $parent); } } ?>
Viewing 4 replies - 1 through 4 (of 4 total)