Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Dan

    (@danrip)

    FIXED! ?? *happy-dance* You definitely put me on the right road with that one – thank you so much!

    Once I’d found get_term_link too, it all started coming together. Here’s where I ended up:

    $terms = get_terms('triptypes');
    	foreach ($terms as $term) {
    	$term_link = get_term_link( $term, 'triptypes' );
    	if( is_wp_error( $term_link ) )
            continue;
    	$triptype_featured_images = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'triptype-big-featured' );
    	echo '<article class="' . implode( ' ', get_post_class() ) . '"  itemtype="https://schema.org/ItemList" itemscope="itemscope">';
    	echo '<h2 class="entry-title"><a href="'. $term_link .'" title="'. $term->name .'">'. $term->name .'</a></h2>';
    	echo '<a href="'. $term_link .'" title="'. $term->name .'" class="location-hover">';
    		the_excerpt();
    	echo '</a>';
    	echo '<img class="aligncenter" src="'. $triptype_featured_images[0] .'" alt="'. get_the_title() .'"></a>';
    	echo '</article>';

    ..and once I’d flushed the permalinks, voila!

    Thanks again, your help was invaluable!

    Thread Starter Dan

    (@danrip)

    Ahh, thank you WPMU DEV!! You rock!

    Actually, I had used get_terms(), but I can see now that I’d dropped the crucial ‘$term->name’ in my attempts to merge the query into the way the rest of the page is displayed, namely:

    $triptype_featured_images = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'triptype-big-featured' );
    			echo '<article class="' . implode( ' ', get_post_class() ) . '" itemtype="https://schema.org/ItemList" itemscope="itemscope">';
    				echo '<h2 class="entry-title"><a href="'. get_permalink() .'" title="'. get_the_title() .'">'. get_the_title() .'</a></h2>';
    				echo '<a href="'. get_permalink() .'" title="'. get_the_title() .'" class="location-hover">';
    					the_excerpt();
    				echo '</a>';
    				echo '<img class="aligncenter" src="'. $triptype_featured_images[0] .'" alt="'. get_the_title() .'"></a>';
    			echo '</article>';
    }
    }
    }

    Can I ask – where would I drop $term->name into this? I’m using it from elsewhere in the site, and want to keep the layout uniform.

    Thank you

    Just had the same issue while using the Groups plugin to the same end. Posted a comment on the author’s site and he produced a workaround:

    https://www.itthinx.com/2013/02/12/how-to-hide-the-woocommerce-shop-page/

    To the OP, if you can replicate in Groups what you’re doing in Member Access, this might be a solution for you.

    Hey Candell,
    If you’re still looking to solve this and you’re not locked in to using Woocommerce, Cart66 will do it out of the box.

    HTH

    @tungjacob – use a conditional tag so the function only fires on the homepage – if(is_front_page() should do the trick.

Viewing 5 replies - 1 through 5 (of 5 total)