Community Forums › Forums › Archived Forums › General Discussion › Genesis archive
This topic is: not resolved
- This topic has 3 replies, 2 voices, and was last updated 10 years, 3 months ago by
Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
August 18, 2013 at 4:19 pm #57224
mmjaeger
MemberHello
I duplicated the genesis 2 archive page and have some custom loop in there - everything works fine except that I'm getting a "Filed under:" some category below the archive - I've no idea where it's coming from and how to get rid of it?Hope you guys can help.
Thanks
August 19, 2013 at 7:40 am #57302Brad Dalton
ParticipantCan you please paste the code for the file into Pastebin and drop the link here so i can take a look? Thanks
August 19, 2013 at 8:47 am #57315mmjaeger
MemberHello Brad
I kind of was able to solve the problem by adding to the template:
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
here's the code:
<?php /** * Genesis Framework. * * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances. * Please do all modifications in the form of a child theme. * * @package Genesis\Templates * @author StudioPress * @license GPL-2.0+ * @link http://my.studiopress.com/themes/genesis/ */ //* Template Name: Archive //* Remove standard post content output remove_action( 'genesis_post_content', 'genesis_do_post_content' ); remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); add_action( 'genesis_entry_content', 'custom_page_archive_content' ); add_action( 'genesis_post_content', 'custom_page_archive_content' ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); /** * This function outputs sitemap-esque columns displaying all pages, * categories, authors, monthly archives, and recent posts. * * @since 1.6 */ function custom_page_archive_content() { ?> <h5><?php _e( 'Categories:', 'genesis' ); ?></h5> <ul> <?php wp_list_categories( 'sort_column=name&title_li=' ); ?> </ul> <h5><?php _e( 'Tags:', 'genesis' ); ?></h5> <div class="tag-list-archive clearfix"> <?php $args = array ( smallest => 12, largest => 12, unit => 'px', number => 0, format => 'list' ); wp_tag_cloud( $args ); ?> </div> <h5><?php _e( 'News:', 'genesis' ); ?></h5> <div class="blog-list-archive"> <?php $args = array ( 'post_type' => 'post', 'order_by' => 'date', 'order' => 'DESC', 'showposts' => -1 ); $y = null; $m = null; $loop = new WP_Query( $args ); if( $loop->have_posts() ): while( $loop->have_posts() ): $loop->the_post(); global $post; $archive_year = get_the_time('Y'); $archive_month = get_the_time('m'); if ( $archive_year != $y ) { if ( !is_null( $y ) ) { // a list is already open, close it first echo "\n\t\t" . '</li>'; // close year li echo "\n\t" . '</ul>'; // close year ul echo "\n\t\t\t\t\t" . '</ul>'; // close list posts echo "\n\t\t\t\t" . '</li>'; // close month li echo "\n\t\t\t" . '</ul>'; // close month ul $m = null; } echo "\n\t" . '<ul class="toggle y-' . $archive_year . '">'; echo "\n\t\t" . '<li><a name="y_' . $archive_year . '" class="entry-year" href="'. get_year_link( $archive_year ) .'">' . $archive_year . '<i class="icon-calendar pull-left"></i></a>'; } if ( $archive_month != $m ) { if ( !is_null( $m ) ) { // a list is already open, close it first echo "\n\t\t\t\t\t" . '</ul>'; // close list posts echo "\n\t\t\t\t" . '</li>'; // close month li echo "\n\t\t\t" . '</ul>'; // close month ul } echo "\n\t\t\t" . '<ul class="m-' . $archive_month . '">'; //echo "\n\t\t\t\t" . '<li><a class="entry-month" href="'. get_month_link( $archive_year, $archive_month ) .'">' . strftime( '%B' , mktime( 0, 0, 0, $archive_month ) ) . '</a>'; echo "\n\t\t\t\t" . '<li><a class="entry-month" href="'. get_month_link( $archive_year, $archive_month ) .'">' . get_the_date('F') . '</a>'; echo "\n\t\t\t\t\t" . '<ul>'; // list posts } echo "\n\t\t\t\t\t\t" . '<li><a class="entry-link" href="'. get_permalink() .'"><span class="entry-date">' . get_the_date('m/d/Y') . '</span>' . get_the_title() .'</a></li>'; $y = $archive_year; $m = $archive_month; endwhile; echo "\n\t\t\t\t\t" . '</ul>'; // close list posts echo "\n\t\t\t\t" . '</li>'; // close month li echo "\n\t\t\t" . '</ul>'; // close month ul echo "\n\t\t" . '</li>'; // close year li echo "\n\t" . '</ul>' . "\n"; // close year ul endif; ?> </div> <!-- .blog-list-archive --> <?php } genesis();
August 19, 2013 at 10:48 am #57338Brad Dalton
ParticipantIts for post meta category and tags and can be removed using CSS, PHP or the Genesis Simple Edits plugin.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘General Discussion’ is closed to new topics and replies.