Dutchg
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: image caption breaks text wrap, twenty-twelve themeGot it, Matt. Thanks. I think I’ll sidestep the issue by making the captions part of the image itself–I need the flexibility of placing the images in the middle of longish paragraphs.
I appreciate your help in tracking down the issue.
Forum: Fixing WordPress
In reply to: image caption breaks text wrap, twenty-twelve themeAny other thoughts on this? I haven’t found the fix yet.
Thanks for any other ideas.Forum: Fixing WordPress
In reply to: image caption breaks text wrap, twenty-twelve themeBut IE is showing the same behavior–i.e., breaking when the caption is added. So are you saying, Matt, that 1 and 2 look identical on Safari? … I mean other than 2 having a caption.
Forum: Fixing WordPress
In reply to: image caption breaks text wrap, twenty-twelve themeAh, interesting. I’m on Chrome, on PC.
Forum: Fixing WordPress
In reply to: separate page for podcast episodesI’ve been searching and experimenting. I think I found my answer. I found a longer “page of posts” file and slipped that in for the “podcast” page theme we had, and identifed “podcast” as the category to display. So the new podcasts.php one looks like this, and seems to be doing the trick.
<?php /* Template Name: Podcasts */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args= array( 'category_name' => 'podcast', // Change this category SLUG to suit your use; or see for query parameters http://codex.wordpress.org/Class_Reference/WP_Query#Parameters 'paged' => $paged ); query_posts($args); if( have_posts() ) :?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> <?php twentytwelve_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1> </header> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; wp_reset_query(); ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>I also loaded a plug-in to help switch in alternate header on the podcast page. Getting there…
thanks again for your help, Esmi
Forum: Fixing WordPress
In reply to: separate page for podcast episodesFloating over “podcast” on my Categories page, it says tag_ID=9
Forum: Fixing WordPress
In reply to: separate page for podcast episodesesmi, I’m sorry to bother you, but I’m unable to solve this. Per my last note, the podcast page we created is not showing my posts that are categorized as podcasts. Any pointers you could provide would be greatly appreciated.
Thanks,
DutchForum: Fixing WordPress
In reply to: add podcast pageI’m sure your tips were great, Leo. I’m just too much of a beginner to be able to fill in the conceptual gaps, and the WordPress codex pages aren’t as beginner-friendly as they could be.
I understood the idea of excluding a category from my home page, but I wasn’t getting how to then make a page to just show the podcasts.
That’s why I came back here this morning to continue the conversation with you. When I did, the moderator asked me to start a new topic, which I did, here.
Forum: Fixing WordPress
In reply to: separate page for podcast episodesesmi, I’ve been experimenting with this for the last couple hours. You will see I’ve put the main nav up top, just beneath my header. The “podcast” link in that nav points to the custom page we created this morning.
But you’ll see that when you click that podcast link, the one podcast I’ve uploaded doesn’t show up. I can’t figure out why.
I could make that top-nav podcast link go to the “category” podcast instead of the page we created (as the category link in the sidebar now works), but I was hoping that having a custom page for the podcast would allow me to customize the header for the podcast (haven’t tried that yet).
I feel like we’re very close. I’m not sure what I’m doing wrong.
Forum: Fixing WordPress
In reply to: separate page for podcast episodesThanks, esmi. I need to run for the time being, but one more question for now: I’m looking on the post page for that one podcast episode I created and uploaded yesterday, trying to figure out how to associate it with the new podcast template page we just created, but am not seeing it. Feels like I’m missing one step–if I categorize a post as “Podcast” it should show up on this new page, yes?
Thanks again for the high-quality help! I’ll check back in later this afternoon. Have a good one.
Forum: Fixing WordPress
In reply to: separate page for podcast episodesGreat, esmi. That seems to be working. Now…I see where we’re going, but what’s my next move if I want to create that page for my podcasts? Sorry if I seem a little dull about this–I am! I appreciate the help!
Forum: Fixing WordPress
In reply to: separate page for podcast episodeswell.. I changed it to only_category (last line of that snippet), updated, and got this error:
Fatal error: Call to undefined method WP_Query::is_page_template() in /usr/home/mdgarvey/public_html/oldanswers/wp-content/themes/twentytwelve-child/functions.php on line 11
Forum: Fixing WordPress
In reply to: separate page for podcast episodesOK. Just did that. So far so good, I think. I noticed, that last line of your snippet:
add_action( ‘pre_get_posts’, ‘exclude_category’ );
Is “exclude_category” right there? Or should that, too, change to “only_category”?
Forum: Fixing WordPress
In reply to: separate page for podcast episodesI went through the code, re-saved and re-uploaded functions.php and podcasts.php. Then, this time, after I added the new snippet to functions.php and updated, I got shut down and this error:
Fatal error: Cannot redeclare exclude_category() (previously declared in /usr/home/mdgarvey/public_html/oldanswers/wp-content/themes/twentytwelve-child/functions.php:3) in /usr/home/mdgarvey/public_html/oldanswers/wp-content/themes/twentytwelve-child/functions.php on line 14
Forum: Fixing WordPress
In reply to: separate page for podcast episodesI’m having trouble with that, Esmi.
I created that custom page template, uploaded it into my child theme directory. I then went into my child functions.php, adding the code you sent, so it looked like this:
<?php function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-9' ); } } add_action( 'pre_get_posts', 'exclude_category' ); function exclude_category( $query ) { if ( $query->is_page_template( 'podcasts.php' ) && $query->is_main_query() ) { $query->set( 'cat', '9' ); } } add_action( 'pre_get_posts', 'exclude_category' ); ?>When I updated to save that change, the site went away and I got this error:
Warning: Cannot modify header information – headers already sent by (output started at /usr/home/mdgarvey/public_html/oldanswers/wp-content/themes/twentytwelve-child/functions.php:10) in /usr/home/mdgarvey/public_html/oldanswers/wp-includes/pluggable.php on line 1121