Morten Rand-Hendriksen
Forum Replies Created
-
Forum: Reviews
In reply to: [Twenty Twelve] Solid reboot and excellent base for future child themes@corl: The documentation I was referring to is in the theme files themselves. If you open the files in the theme you’ll see tons of commented out sections with explanations of what’s going on.
Forum: Themes and Templates
In reply to: Where does get_the_term_list go in twentytwelveYes, what you have done will work and is correct. There are as many different ways of incorporating this type of function as there are developers out there. The course in question was created to teach general concepts around how to incorporate custom post types in a WordPress theme and you have done just that – taken a general concept and made it work within your theme.
The original course was created using Twenty Ten as the base and we made an update to cover inclusion in Twenty Eleven. The different tools and snippets delivered in the course are written to work with any theme, not just these two, and as you were able to do yourself they are meant to be incorporated the way you want them to be, not just the way I did them in the course.
Your solution works and you should not run into any issues down the road.
Forum: Localhost Installs
In reply to: Best Practices for working locally or live?I can only provide you with my own best practice scenario, but I know that many other developers follow the same procedure:
All my themes, plugins, and other custom builds are done in local environments first, then published to testing servers, and only when everything works across all platforms and on the testing server do I take the project live to the world.
It is worth pointing out that I rarely run the full site on my local installation. For the development phase I usually only populate my site with the bare minimum of content necessary to test all eventualities. This means enough posts to test indexes, posts with the type of content that can be expected on the site, and whatever different page types and other content is to be expected.
Once main development is done I move the theme and other content to a secured testing area on the server on which the project will eventually live. There I test the site with the real content and build it out so we know all the content that will live on the site is in fact working as expected within the solution we built.
After extensive testing in the testing area we take the site live by moving it on the server. This helps us avoid having to reconfigure or repopulate the site so we don’t do things two times.
Forum: Themes and Templates
In reply to: [Sundance] jQuery not loaded on Sundance 1.1We need to file a bug in trac.
Forum: Themes and Templates
In reply to: [Sundance] jQuery not loaded on Sundance 1.1Same thing here. There is definitely something amiss about the enqueuing of jQuery, but the really weird thing is that the slider works in the Theme Customizer. I’m assuming jQuery is called by the Theme Customizer and the theme piggybacks onto that instance so that the slider works.
Forum: Fixing WordPress
In reply to: How do I exclude category from blog pageThe query_posts() method for excluding categories in an index is an old method. There is a new and better one using pre_get_posts() and is_main_query() in a function placed in functions.php in your theme or child theme. There is a detailed explanation in the Codex but for simplicity here is the code example altered to match your requirements:
function exclude_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-17' ); } } add_action( 'pre_get_posts', 'exclude_category' );WordPress is constantly evolving and the pre_get_posts() and is_main_query() functions are fairly new which is why they are not often featured in tutorials. The concept of using a function to alter the main query rather than doing it in a loop or template file is also fairly new.
Try it out and report back.
@landonab: I’ll save you the trouble. The reasoning for going with Twenty Ten originally was that it was the default theme for WordPress and that it is a rock solid baseline theme that is well documented and easy to work with. As this forum thread implies, that is exactly how I feel about Twenty Twelve as well. Draw your own conclusions ;o)
@landonab: Though I can’t talk about upcoming and in-production courses on lynda.com what I can say is that if I were to update the Child Themes course, it would be logical to follow the same line of reasoning used when deciding to use Twenty Ten as the base for the original course. Pardon the vagueness.
Including FitVids would solve this problem, but it’s clunky for a default theme. http://designisphilosophy.com/tutorials/automatic-responsive-videos-in-wordpress-with-oembed-fitvids-and-a-little-php-magic/
Forum: Themes and Templates
In reply to: [Twenty Twelve] Twenty Twelve Featured Image Showing up twiceI agree with @esmi. Post thumbnails is not an issue – it’s a great feature in fact and it interacts well with sharing sites like Google+ and Facebook. The implementation of featured images often leaves something to be desired though. I wouldn’t write them off by removing them from the database. Telling your theme not to display them is a much better option. They don’t do any damage sitting in the database.
Forum: Themes and Templates
In reply to: [Twenty Twelve] Twenty Twelve Featured Image Showing up twice@pratyush: If you want to take away the featured image in one of the templates I recommend you create a child theme and then copy over whatever templates you don’t want the featured image to appear in into your child theme folder. Then all you have to do is find the function that inserts the featured image (looks something like this:
<?php the_post_thumbnail(); ?>) and comment it out or delete it all together. By doing this in your child theme you avoid accidentally causing damage to the main theme and you can experiment to see what works and what doesn’t. Make sense?@paul.cass82: It’s a common mistake when you first start with forums. Send me a message at designisphilosophy.com and I’ll answer.
Forum: Themes and Templates
In reply to: [Twenty Twelve] Twenty Twelve Featured Image Showing up twiceLike @alchymyth said, the image appears twice because it is inserted twice. This is a common issue with themes that use featured images. To work around it I usually use the Image post format as an indicator whether I want the featured image to show up in single post view or not. If the Image post format is on, the featured image shows up, if it’s not on the featured image does not show. But that’s my solution.
@stargiss: The reason you didn’t see the same effect in Twenty Eleven is because in Twenty Eleven the featured image for single posts was hooked to the header image, and even then it only kicked in if your image was wide enough to fit in the header.
@boldt: Twenty Twelve is an excellent base for a child theme. In my opinion it is far better than Twenty Eleven because it has less extra ‘baggage’ in the form of rarely used functions and it is also more cleanly written. You can add or remove menus, widgetized areas, hook in new fonts, do whatever you want.
@otto: While it is true that Chrome works well in IE and that IE7 and IE8 under XP are insecure, these facts are irrelevant to the discussion. We have no control over what browsers the end-users choose or are forced to use, and our role as web developers is not to police the web and the tools being used to access it but rather to convey information.
The IE debate often ignores the core reason why IE in its different iterations is still prevalent: In enterprise environments and many other circumstances, one browser is chosen as default and no other browser is introduced. This is a decision done at sys-admin level and can have reasons that go well outside of the web in general: Intranets, custom apps, the list is endless. Writing IE off as a bad choice is ignoring the reason why many use it. And simply saying “switch to Chrome” gets us nowhere.
I am of the same opinion as you: Users of IE8 should upgrade. But I know that many of those users can’t. Therefore I do everything I can to provide them with a great experience as long as that does not interfere or lessen the possible experience of those with modern browsers. As this minor issue in Twenty Twelve is a deliberate choice of design model that can be easily reversed with no performance or experience difference for anyone other than the IE8 users, I see no reason why it can’t be done.