multari_r
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
I’m also experiencing this same issue.
Forum: Fixing WordPress
In reply to: PHP update breaks wp-adminHi,
The same thing has been happening to my WordPress sites hosted through 1and1 since last Thursday 11-6-14. Nothing on my end has changed. Did 1and1 change something?
Thanks,
RobForum: Fixing WordPress
In reply to: Only Show SubCategory under parent SubCategoryPart of my problem is that I can get the subcategories to show in the hierarchy they are supposed to be in in but then the posts won’t show.
I think the key is to combine these two pieces of code.
<?php global $query_string; query_posts( $query_string . '&orderby=date&order=DESC' ); ?> <?php if (have_posts()){?> <p><span style="font-weight:bold">Sort by Date:</span> <a href="<?php echo str_replace(('?'.$_SERVER['QUERY_STRING']), '', $_SERVER['REQUEST_URI']).'/?sort=date'; ?>">Newest</a> | <a href="<?php echo str_replace(('?'.$_SERVER['QUERY_STRING']), '', $_SERVER['REQUEST_URI']).'/?sort=date2'; ?>">Oldest</a> <span style="font-weight:bold">Sort by Title:</span> <a href="<?php echo str_replace(('?'.$_SERVER['QUERY_STRING']), '', $_SERVER['REQUEST_URI']).'/?sort=title'; ?>">A to Z</a> | <a href="<?php echo str_replace(('?'.$_SERVER['QUERY_STRING']), '', $_SERVER['REQUEST_URI']).'/?sort=title2'; ?>">Z to A</a></p> <?php } ?> <?php if($_GET['sort'] == 'date') query_posts( $query_string . '&orderby=date&order=DESC' ); if($_GET['sort'] == 'title') query_posts( $query_string . '&orderby=title&order=ASC' ); if($_GET['sort'] == 'date2') query_posts( $query_string . '&orderby=date&order=ASC' ); if($_GET['sort'] == 'title2') query_posts( $query_string . '&orderby=title&order=DESC' ); if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="home_closed"> <div class="home_closed_cap"></div> <a href="<?php the_permalink() ?>" class="home_closed_left_cap" rel="bookmark"> <div class="even"> <h3><?php the_title(); ?></h3> <p class="home_closed_posted_date">Posted <?php the_time('F j, Y') ?></p> <?php the_excerpt(); ?> </div> <div class="home_closed_cap"></div> </a> </div> <?php endwhile; endif; ?>and
<?php if(is_category()) { $breakpoint = 0; $thiscat = get_term( get_query_var('cat') , 'category' ); $subcategories = get_terms( 'category' , 'parent='.get_query_var('cat') ); if(empty($subcategories) && $thiscat->parent != 0) { $subcategories = get_terms( 'category' , 'parent='.$thiscat->parent.'' ); } $items=''; if(!empty($subcategories)) { foreach($subcategories as $subcat) { if($thiscat->term_id == $subcat->term_id) $current = ' current-cat'; else $current = ''; $items .= ' <div class="home_closed"> <div class="home_closed_cap"></div> <a href="'.get_category_link( $subcat->term_id ).'" title="'.$subcat->description.'" class="home_closed_left_cap" rel="bookmark"> <div class="even"> <h3>'.$subcat->name.' ('.$subcat->count.' posts)</h3> <p class="home_closed_posted_date">Posted '.get_the_time('F j, Y').'</p> </div> <div class="home_closed_cap"></div> </a> </div> '; } echo "$items"; } unset($subcategories,$subcat,$thiscat,$items); } else { // If no current cat query, just get the top level ones using wp_list_categories. ?> <ul> <?php wp_list_categories('title_li=&depth=1');?> </ul> <?php } ?>I’m wonder if some kind of an “if/then” statement might work but I’m more of a front end developer with a little backend experience. Usually I can fumble my way through but I can’t figure this one out for the life of me.
Viewing 3 replies - 1 through 3 (of 3 total)