Genesis archive replacement
-
I am attempting to create an Archives, Categories, etc. templates using your plugin. I am using Genesis, so a lot of the code is missing and I don’t have easy access to the loop. I have the pro version and I just can’t figure it out.
I got it to work for the Search page with the following code:
add_action( 'genesis_before_loop', 'genesis_do_search_title' ); /** * Echo the title with the search term. * * @since 1.9.0 */ function genesis_do_search_title() { $title = sprintf( '<div class="archive-description"><h1 class="archive-title">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search Results for:', 'genesis' ) ), get_search_query() ); echo PT_CV_Functions_Pro::view_overwrite_tpl( 'VIEWCODEGOESHERE' ); } genesis();
I just replaced the following line with your line in your documentation:
echo apply_filters( 'genesis_search_title_output', $title ) . "\n";
This is what their default template looks like:
//* 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', 'genesis_page_archive_content' ); add_action( 'genesis_post_content', 'genesis_page_archive_content' ); /** * This function outputs sitemap-esque columns displaying all pages, * categories, authors, monthly archives, and recent posts. * * @since 1.6 */ function genesis_page_archive_content() { ?> <h4><?php _e( 'Pages:', 'genesis' ); ?></h4> <ul> <?php wp_list_pages( 'title_li=' ); ?> </ul> <h4><?php _e( 'Categories:', 'genesis' ); ?></h4> <ul> <?php wp_list_categories( 'sort_column=name&title_li=' ); ?> </ul> <h4><?php _e( 'Authors:', 'genesis' ); ?></h4> <ul> <?php wp_list_authors( 'exclude_admin=0&optioncount=1' ); ?> </ul> <h4><?php _e( 'Monthly:', 'genesis' ); ?></h4> <ul> <?php wp_get_archives( 'type=monthly' ); ?> </ul> <h4><?php _e( 'Recent Posts:', 'genesis' ); ?></h4> <ul> <?php wp_get_archives( 'type=postbypost&limit=100' ); ?> </ul> <?php } genesis();
Any ideas?
Otherwise, awesome job. Saved me a lot of time on a gallery page.
https://www.ads-software.com/plugins/content-views-query-and-display-post-page/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Genesis archive replacement’ is closed to new replies.