• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

brettatkin

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 20 posts - 1 through 20 (of 37 total)
1 2 →
  • Author
    Posts
  • February 28, 2017 at 8:30 am in reply to: Grid Layout Issue with Blog Archive Page #202162
    brettatkin
    Member

    I'm not sure how this answers my question.

    October 15, 2016 at 6:37 am in reply to: Multiple Loops on Custom Post Type Archive Page #194777
    brettatkin
    Member

    Here is the solution that worked for me. It is what I expected I needed to do - I let the initial solution I found control my thinking rather than looking for another solution. Thanks to Carrie Dills (as usual) for getting me back on track. Here is the post form Carrie: https://carriedils.com/custom-page-template-genesis/

    Here is my final code:

    <?php
    
    //* Remove the ad widget
    remove_action( 'genesis_before_loop', 'adspace_before_loop' );
    
    //* Remove author box
    remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
    
    //* Remove the post meta function
    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    
    //* Remove the post info function
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    
    //* Remove the post image (requires HTML5 theme support)
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    
    //* Remove the entry title (requires HTML5 theme support)
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    
    //* Remove the post content
    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    add_action( 'genesis_loop', 'dr_work_loop' );
    
    function dr_work_loop() {
    	$args_1 = (array(
    	'post_type'      => 'work',
    	'order'          => 'DESC',
    	'orderby'        => 'date',
    	'post_status'    => 'publish',
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'work-type',
    			'field'    => 'slug',
    			'terms'    => 'dwell',
    		),
    	),
    	'posts_per_page' => -1 
    	));
    	$loop = new WP_Query( $args_1 );
    	if( $loop->have_posts() ) {
    		// loop through posts
    		echo '<h2 id="dwell">Dwell</h2>';
    		while( $loop->have_posts() ): $loop->the_post();
    			echo '<div class="archive-featured-image type-work">';
    			echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    			echo get_the_post_thumbnail($thumbnail->ID);
    			echo '</a>';
    			echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    			echo the_title( '<p class="work-title">', '</p>' );
    			echo '</a>';
    			echo '</div>';
    		endwhile;
    		echo '<div style="clear: both;"></div>';
    	}
    	wp_reset_postdata();
    
    	$args_2 = (array(
    	'post_type'      => 'work',
    	'order'          => 'DESC',
    	'orderby'        => 'date',
    	'post_status'    => 'publish',
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'work-type',
    			'field'    => 'slug',
    			'terms'    => 'commerce',
    		),
    	),
    	'posts_per_page' => -1 
    	));
    	$loop = new WP_Query( $args_2 );
    	if( $loop->have_posts() ) {
    		// loop through posts
    		echo '<h2 id="commerce">Commerce</h2>';
    		while( $loop->have_posts() ): $loop->the_post();
    			echo '<div class="archive-featured-image type-work">';
    			echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    			echo get_the_post_thumbnail($thumbnail->ID);
    			echo '</a>';
    			echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    			echo the_title( '<p class="work-title">', '</p>' );
    			echo '</a>';
    			echo '</div>';
    		endwhile;
    		echo '<div style="clear: both;"></div>';
    	}
    	wp_reset_postdata();
    
    	$args_3 = (array(
    	'post_type'      => 'work',
    	'order'          => 'DESC',
    	'orderby'        => 'date',
    	'post_status'    => 'publish',
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'work-type',
    			'field'    => 'slug',
    			'terms'    => 'Interiors',
    		),
    	),
    	'posts_per_page' => -1 
    	));
    	$loop = new WP_Query( $args_3 );
    	if( $loop->have_posts() ) {
    		// loop through posts
    		echo '<h2 id="interiors">Interiors</h2>';
    		while( $loop->have_posts() ): $loop->the_post();
    			echo '<div class="archive-featured-image type-work">';
    			echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    			echo get_the_post_thumbnail($thumbnail->ID);
    			echo '</a>';
    			echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    			echo the_title( '<p class="work-title">', '</p>' );
    			echo '</a>';
    			echo '</div>';
    		endwhile;
    	}
    	wp_reset_postdata();
    
    }
    
    genesis();
    October 12, 2016 at 2:24 pm in reply to: Multiple Loops on Custom Post Type Archive Page #194600
    brettatkin
    Member

    archive-work.php

    October 12, 2016 at 11:14 am in reply to: Navigation on CPT with manual sort? #194593
    brettatkin
    Member

    Not sure what you mean by seamlessly. Here is an example on a site I'm still working on.

    http://dr.betaforming.com/studio/people/david-rausch-principal-architect-founder/

    See the next/previous at the bottom of the page. You can paginate through all five employees. Each employee is a post (a CPT).

    I'm doing the same thing in another section that paginates through posts, but limited to the taxonomy term for that post.

    If each book page is a post with a taxonomy of "book 1", they should be able to page through the posts. The only time consuming piece would be getting the pages in order.

    October 11, 2016 at 4:26 pm in reply to: Navigation on CPT with manual sort? #194546
    brettatkin
    Member

    Not sure if this will help (it is alternative to what you asked), but I just did something similar where I added pagination for a CPT based on the custom taxonomy. Here is my code:

    add_action( 'genesis_entry_footer', 'dr_work_prev_next_post_nav_cpt' );
    function dr_work_prev_next_post_nav_cpt() {
    	if ( ! is_singular( array( 'work', 'post' ) ) ) //add your CPT name to the array
    		return;
    	genesis_markup( array(
    		'html5'   => '<div %s>',
    		'xhtml'   => '<div class="navigation">',
    		'context' => 'adjacent-entry-pagination',
    	) );
    	echo '<div class="pagination-previous alignleft">';
    	previous_post_link( '%link', 'Previous Project', TRUE, '', 'work-type' );
    	echo '</div>';
    	echo '<div class="pagination-next alignright">';
    	next_post_link( '%link', 'Next Project', TRUE, '', 'work-type' );
    	echo '</div>';
    	echo '</div>';
    }

    In this line (previous_post_link( '%link', 'Previous Project', TRUE, '', 'work-type' );), work-type is the name of my custom taxonomy. What happens is that the pagination works just for items that have the same taxonomy value.

    So, you could try creating a custom taxonomy for the CPT, create values for each book. Then for each page, assign it that book value and order the posts accordingly.

    October 11, 2016 at 4:12 pm in reply to: Multiple Loops on Custom Post Type Archive Page #194542
    brettatkin
    Member

    Here is the code for the CPT and CPT Taxonomy. I'm mixing categories (in the WP sense) with my general categorization scheme for the projects. I see why you're confused. Here is a screenshot of my taxonomy setup.

    http://dr.betaforming.com/work-types.gif

    Here is the code for my CPT and CPT Taxonomy.

    //* Create Work custom taxonomy
    add_action( 'init', 'executive_type_taxonomy' );
    function executive_type_taxonomy() {
    
    	register_taxonomy( 'work-type', 'work',
    		array(
    			'labels' => array(
    				'name'          => _x( 'Types', 'taxonomy general name', 'executive' ),
    				'add_new_item'  => __( 'Add New Work Type', 'executive' ),
    				'new_item_name' => __( 'New Work Type', 'executive' ),
    			),
    			'exclude_from_search' => true,
    			'has_archive'         => true,
    			'hierarchical'        => true,
    			'rewrite'             => array( 'slug' => 'work-type', 'with_front' => false ),
    			'show_admin_column'   => true,
    			'show_ui'             => true,
    			'show_tagcloud'       => false,
    		)
    	);
    }
    
    //* Create Work custom post type
    add_action( 'init', 'work_post_type' );
    function work_post_type() {
    
    	register_post_type( 'work',
    		array(
    			'labels' => array(
    				'name'          => __( 'Work', 'executive' ),
    				'singular_name' => __( 'Work', 'executive' ),
    			),
    			'has_archive'  => true,
    			'hierarchical' => true,
    			'menu_icon'    => 'dashicons-images-alt2',
    			'public'       => true,
    			'rewrite'      => array( 'slug' => 'work', 'with_front' => false ),
    			'supports'     => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'page-attributes', 'genesis-seo', 'genesis-cpt-archives-settings' ),
    			'taxonomies'   => array( 'work-type' ),
    
    		)
    	);
    }
    October 11, 2016 at 3:28 pm in reply to: Multiple Loops on Custom Post Type Archive Page #194540
    brettatkin
    Member

    Yes, I want to display all the projects broken down by category (Dwell, Commerce and Interiors) - the one taxonomy (work-type) has three categories.

    Not sure what you mean by the $thumbnail variable. Why do I need to define that?

    Yes, ultimately the url will be /work. I had the slug configured for my CPT to be work/projects just so I could keep the other working example. I have removed that page and updated my CPT slug to be what it should be in the end. So the new URL is:

    http://dr.betaforming.com/work/

    Thanks

    October 10, 2016 at 8:49 pm in reply to: Toggle sidebar? #194485
    brettatkin
    Member

    Pretty sure that response isn't going to get you more help from Brad and many others...

    Either way, stating that is has to work with Genesis is misleading because in the end, it is just HTML, CSS and JS. The Tri.be is a WP site - have you looked at the code?. If you want something off the shelf that "works" with Genesis, than Brad's recommendation is likely the most viable and you'll have to adjust your expectations.. If that isn't what you want, have you looked at the inspiration for this plugin?

    http://tympanus.net/Development/FullscreenOverlayStyles/index.html

    I'm pretty confident you're not going to find some point and click solution for this that perfectly fits your needs.

    October 10, 2016 at 7:15 pm in reply to: WP-Cycle replacement plugin? #194484
    brettatkin
    Member

    I second Brad's recommendation. If you want to spend a few dollars and work through a bigger learning curve, you can do some pretty amazing things with the Revolution Slider.

    March 26, 2016 at 11:28 am in reply to: Custom Blog Template #182294
    brettatkin
    Member

    Victor, I want to do what the default WooCommerce Shop page does. It the Dashboard, WC creates a page called "shop". What I enter on that page for the Title and Content shows up on the Shop page above the product output.

    http://foralles.com/shop/

    I hard-coded the Title and Content into the page_blog.php template file, but I want to make this dynamic - the client can update.

    http://foralles.com/community/

    Does that help?

    Thanks

    Brett

    February 9, 2016 at 9:27 am in reply to: Template Page Not Getting Loaded #178654
    brettatkin
    Member

    Thank you for the help Victor. I did have to change the name of the template file.

    I thought child theme pages were supposed to get loaded "last" - supersede the parent theme pages?

    I'll check out your article on the new Sitemap Filter.

    Thanks again.

    Brett

    January 12, 2016 at 10:09 am in reply to: Missing Pagination on Custom Blog Home Page Template #176301
    brettatkin
    Member

    !@#@#$!@$!@#, as soon as read this I remembered that this was set in the Theme Settings and not Settings > Reading for any pages using the Blog template. My custom category archive pages use the Settings > Reading setting.

    Why does Genesis overwrite this?

    Thanks!

    Brett

    January 11, 2016 at 2:17 pm in reply to: Template Hierarchy #176248
    brettatkin
    Member

    Thanks for the Query Monitor recommendation. That is very cool. I ended up creating a page_blog.php file in the child theme after finding it in the framework theme (I should have looked there first and your reminder prompted me to look further....) and customizing it.

    Why does Genesis use a page template for the post archive page functionality unlike all the other themes I've worked with?

    Everything else is working as I want except for one thing that I'll ask in a separate question because it isn't related to this issue.

    Thanks again!

    Brett

    November 18, 2015 at 1:51 pm in reply to: Mobile Navigation on Minimum Pro #171458
    brettatkin
    Member

    Yep, that took care of things. I also added the code from the Enterprise Pro theme to make it work better.

    Thanks!

    Brett

    November 18, 2015 at 1:50 pm in reply to: Remove spacing below image #171457
    brettatkin
    Member

    Thank you Christopher, that took care of things.

    Brett

    June 5, 2015 at 3:41 pm in reply to: Managing Footer widget spacing #155029
    brettatkin
    Member

    This isn't an issue with the footer widgets. The theme is set up for 3 footer columns I believe. When you restore the original CSS code, do the columns line up and resize correctly?

    June 5, 2015 at 1:31 pm in reply to: Custom Error Message for CPT Archive Page #155019
    brettatkin
    Member

    Worked perfectly, thanks!

    Brett

    June 5, 2015 at 9:23 am in reply to: Managing Footer widget spacing #154987
    brettatkin
    Member

    There is a fixed width for the footer widget divs (270px). It should be a percentage. Is this the default for theme or did you change it?

    May 11, 2015 at 3:00 pm in reply to: Active Class in Nav Menu for Blog Posts #151780
    brettatkin
    Member

    Thanks for the help Jackie. The first two links you provided didn't work. It highlighted the menu item regardless of the page/post because "menu-item-#" gets added no matter where you are on the site.

    You're code worked for me though, thanks!

    You were correct, I had added some extra code to my site to achieve the same thing for the blog posts. I forgot about doing that.

    I looked back at a couple of my custom coded WP themes and this isn't an issue - individual blogs pages are applying the appropriate active classes to the nav menu item. It appears Genesis is using Superfish for the navigation. Could this be the problem? It really seams this should work out of the box, it does for parent child pages.

    This is what worked on the Porsche Site. For some reason, this code isn't working for The Events Calendar CPT from Modern Tribe.

    add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
    function special_nav_class($classes, $item){
         
         if(is_single() && ('gallery' == get_post_type()) && $item->title == 'Photo Galleries' ){
                     $classes[] = 'current-menu-item';
         }
    
     	if(is_single() && ('classifieds' == get_post_type()) && $item->title == 'Classifieds' ){
                     $classes[] = 'current-menu-item';
         }
    
     	if(is_single() && ('tribe_events' == get_post_type()) && $item->title == 'Upcoming Events' ){
                     $classes[] = 'current-menu-item';
         }
    
     	if(is_single() && ('post' == get_post_type()) && $item->title == 'Recent News' ){
                     $classes[] = 'current-menu-item';
         }
    
         return $classes;
    } 

    This is what worked in the IOI site. This WOULD NOT work on the Porsche site because I have multiple post types.

    function add_custom_class($classes=array(), $menu_item=false) {
        if ( !is_home() && !is_page() && 'Blog' == $menu_item->title && !in_array( 'current-menu-item', $classes ) ) {
            $classes[] = 'current-menu-item';        
        }                    
        return $classes;
    }
    add_filter('nav_menu_css_class', 'add_custom_class', 100, 2);
    May 11, 2015 at 8:50 am in reply to: Active Class in Nav Menu for Blog Posts #151715
    brettatkin
    Member

    Jackie,

    Thank you for the additional help. I won't have time to look at this until later today. I will let you know what happens.

    Is this a bug in the framework or the theme?

    Thanks

    Brett

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 37 total)
1 2 →

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble