dgissen
Forum Replies Created
-
Forum: Themes and Templates
In reply to: remove twentytwelve mobile menu – ubermenuI think I have it:
put this line of code in the child theme style.css:
.menu-toggle {display: none;}
Activate ubermenu in the plug-in menu. It appears to be working.
If you don’t have ubermenu and you insert the above code in the style.css it will simply make the entire menu-button and menu disappear, so you will lose navigation.Forum: Fixing WordPress
In reply to: Nav-menu cut-off due to short length of custom taxonomy indexAh, figured out a fix:
I gave the div.wrapper plenty of padding and it doesn’t interfere with any other formatting. Will there be trouble down the road with this fix?I see my error: is_tax should be is_tax()
Yes, it’s strange that the columns are reformatting all the content on the blog and not just what’s in the conditional statement below:
add_filter('post_class','category_two_column_classes'); function category_two_column_classes( $classes ) { global $wp_query; if( is_post_type_archive() || is_tax ) : $classes[] = 'two-column-post'; if( $wp_query->current_post%2 == 0 ) $classes[] = 'two-column-post-left'; endif; return $classes; }
Ok; excellent. Thank you, thank you, thank you.
One (hopefully last) question on this topic: how do I make the css formatting only apply to is_tax and is_post_type_archive ? I don’t want the pages on the rest of the site to have this formatting?
btw, functions.php is fine.
Ok: I think we’re close.
I’ve got it to work on the custom post type index page by using is_post_type_archive and custom taxonomy using is_tax. This is very exciting.But, the three column code is over my head
Hi and thanks. I’ve been enjoying reading your posts on grids, but I’m too much of a newbie to implement them easily. The post_type is called “producers”, but whatever I do in this page I want to adapt to taxonomy page which has a similar structure.
So, reading your post, do I do the following?
1. change the is_category() to is post_type () [ or would it be is post_type (‘producers’)?2. change this line? Here I may need some direction to insert a third column.
if( $wp_query->current_post%2 == 0 ) $classes[] = ‘two-column-post-left’;btw, I assume that all of the code in the post you wrote should be surrounded by
<?php ‘the code’ ?>
Is that right?Forum: Themes and Templates
In reply to: Where does get_the_term_list go in twentytwelvethanks!
Forum: Themes and Templates
In reply to: Where does get_the_term_list go in twentytwelveOk; I think I figured it out. vis-a-vis the above:
I made a file content-producers where I included this data:
<?php /** * The template used for displaying page content in page.php * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> </header> <div class="entry-meta-custom"> <div>Country: <?php echo get_the_term_list( $post->ID, 'country', '', ', ', '' ); ?></div> <div>Region: <?php echo get_the_term_list( $post->ID, 'region', '', ', ', '' ); ?></div> <div>Appellation: <?php echo get_the_term_list( $post->ID, 'appellation', '', ', ', '' ); ?></div> </div><!-- .entry-meta-custom --> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?> </footer><!-- .entry-meta --> </article><!-- #post -->
Then I hooked it into the original single-producers.php file but with the following changes – specifically calling for “content-producers” instead of :content”.
<?php /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content-producers', get_post_type() ); ?> <nav class="nav-single"> <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3> <span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?></span> <span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span> </nav><!-- .nav-single --> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
It appears to work, but will I get into trouble down the road?
Forum: Themes and Templates
In reply to: Where does get_the_term_list go in twentytwelveOk, I’m mostly there. The below is in a file I named single-producers.php.
Now I just need to figure out how to get the custom taxonomy data to appear below the page title. Right now it appears above it. Does anyone have an easy fix?<?php /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Twenty_Twelve * @since Twenty Twelve 1.0 */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_type() ); ?> <div class="entry-meta-custom"> <div>Country: <?php echo get_the_term_list( $post->ID, 'country', '', ', ', '' ); ?></div> <div>Region: <?php echo get_the_term_list( $post->ID, 'region', '', ', ', '' ); ?></div> <div>Appellation: <?php echo get_the_term_list( $post->ID, 'appellation', '', ', ', '' ); ?></div> </div><!-- .entry-meta-custom --> <nav class="nav-single"> <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3> <span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?></span> <span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span> </nav><!-- .nav-single --> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Thanks! that worked perfectly!
No; I can’t seem to figure i out.
I inserted this bit in the header.php of my child theme:<img class=”site-logo” src=”<?php echo get_stylesheet_directory_uri(); ?>/images/site-logo.png” alt=”site logo” />
I’m too much of a noob to figure out where to put the href = “…” bit.
Forum: Themes and Templates
In reply to: [Theme: Twenty Twelve] Replace site title with image?It’s actually related; there is code that you put in that very line. But thanks. I may do both.
Forum: Themes and Templates
In reply to: [Theme: Twenty Twelve] Replace site title with image?The above code works great and thanks, but what url do i put in so that when you click on the site logo you return to the site’s homepage?
Forum: Fixing WordPress
In reply to: change custom logo on two pagesI figured it out!