Functions Config

As modularity continues to gain traction it’s only fitting we take a similar approach with our WordPress theme’s functions.php config. Within the functions.php you’ll now notice the new config and partials setup. Below in an example of our new config with each piece of logic separated into it’s own partial file.

<?php
	include_once( get_template_directory() . '/wpflex-options.php' );

	if ( ! function_exists( 'wpflex_setup' ) ) :
		function wpflex_setup() {
			require_once locate_template('/inc/functions/theme-support.php');
			require_once locate_template('/inc/functions/asset-loader.php');
			require_once locate_template('/inc/functions/title.php');
			require_once locate_template('/inc/functions/header.php');
			require_once locate_template('/inc/functions/nav-menu.php');
			require_once locate_template('/inc/functions/comments.php');
			require_once locate_template('/inc/functions/comment-reply.php');
			require_once locate_template('/inc/functions/widgets.php');
			require_once locate_template('/inc/functions/editor-styles.php');
			require_once locate_template('/inc/functions/content-width.php');
		}
	endif;

	add_action( 'after_setup_theme', 'wpflex_setup' );
?>

Commit fd21b5a15c

Normalize Loading, Main Tag & New Theme Unit Data

New updates have been pushed and contain the following enhancements.

All template files are now using the tag

<main>

Normalize.css is now loaded in via functions.php as a dependency using…

wp_register_style()

We also are linking to a CDN for fetching the normalize asset.

Theme Unit Test data has been updated and now includes the most current release made available to the WordPress community.

WP-Flex v1.0.7

In this new release I’ve taken the liberty to give comments a fresh slate. By default you will be able to give the comments any kind of styling you desire without the requirement of removing default styling and classes. It’s a much better approach for those desiring customization. This obviously will take initiative from the author/developer to use an inspector to observe styling classes required for a theme’s style sheets. Continue reading

WP-Flex v1.0.6

Here’s a quick overview for all you WP-Flex users and authors on the new additions to v1.0.6.

  1. role=search added to search form
  2. the_content is now surrounded by a div with a class of entry-content.
    <!-- Resolves Issue #4: https://github.com/grayghostvisuals/WP-Flex/issues/4 -->
     <div class="entry-content">
         <?php the_content(); ?>
     </div>
  3. Converted code base formatting to indentation instead of tabs

  4. Updated Normalize to 2.1.0 for style.css
  5. Updated HTML5BP base styles for style.css
  6. Our snippets folder now contains a snippet for author biographies and avatars that can be displayed for posts. Wow! where have they been all this time? Well, we now have this feature so enjoy.

The New Snippets Folder

Now included with WP–Flex is a new folder titled “Snippets” in which you’ll find the beginnings of useful and creative customizations for your WordPress theme. Look for this snippets folder to become quite the handy tool for authors to have on hand. Got a helpful snippet that makes WordPress themes cooler? then why not give back to our Snippets folder. The WP–Flex community will love you for it.

Version 1.0.5 Goodies

Uh oh! Themes are recommended to hook stylesheets and script enqueue callbacks into wp_enqueue_scripts. To be more specific, it’s not recommended that a theme force a 3rd party served JavaScript or CSS file by default, Doing so opens the users up to reliance upon a external host which is out of their control. A much better alternative is to use/recomend a Plugin such as Plugin: “Use Google Libraries” which automatically uses the Google–CDN served jQuery of the same version that WordPress uses this ultimately reduces breakage caused by Themes/Plugins which hardcode the file to use. Continue reading

v1.0.4 Patches and Updates

I’ve been going through WordPress’ Codex and Theme Review documentation once again and found that our <title> tag (among a few other areas) were in dire need of updating. Previously, we had a very verbose and tangled set of conditional comments to sort out the <title> tag filtering, but now the Codex requires something a little bit different, cleaner and search engine friendly. Let’s walk through the major portions of the changes to WP&ndash-Flex v1.0.4. Continue reading