How do I change number of columns in a proper way in twentyfourteen child theme?

I’m not sure why you are using exit() in yourreactivatejs()` method as this breaks the method before it even loads your script (hopefully this is for debugging purposes). I also do think that in is unnecessary to create a class to this, a simple spaghetti function would do perfectly. Anyways, if you need to use … Read more

How to change default header image dimensions in twentyfourteen child theme?

The is a filter to the custom header function in the twenty fourteen theme. You can use that to add your new sizes. Here is what I use to change the default size. function wpse_custom_header_setup() { add_theme_support( ‘custom-header’, apply_filters( ‘wpse_header_args’, array( ‘width’ => 1460, ‘height’ => 220, ) ) ); } add_action( ‘after_setup_theme’, ‘wpse_custom_header_setup’ ); … Read more

How to change featured content to a different tag in WordPress Twenty Fourteen?

The internal implementation details of that feature are of questionable sanity. If you take a look at said featured-content.php template you would see that it get posts from twentyfourteen_get_featured_posts() however the only thing that function has is twentyfourteen_get_featured_posts filter from quick look at which in peculiar fashion nothing is actually getting hooked because twentyfourteen_setup() declares … Read more

How do I add a custom post type to the Featured Content in twenty fourteen theme?

The twentyfourteen_get_featured_posts filter: It took some digging, to figure out how the twentyfourteen_get_featured_posts filter is used in the TwentyFourteen theme 😉 The featured content is fetched with: $featured_posts = twentyfourteen_get_featured_posts(); but this function is only this single line: return apply_filters( ‘twentyfourteen_get_featured_posts’, array() ); so where’s the meat? We find it in the Featured_Content class, starting … Read more

how to install bootstrap to twentyfourteen theme

The best way to include bootstrap in your theme is to enqueue bootstrap CSS and JS in your functions.php file. This is how you can enqueue bootstrap CSS and JS from CDN hosted version. function my_scripts_enqueue() { wp_register_script( ‘bootstrap-js’, ‘//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js’, array(‘jquery’), NULL, true ); wp_register_style( ‘bootstrap-css’, ‘//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css’, false, NULL, ‘all’ ); wp_enqueue_script( ‘bootstrap-js’ ); wp_enqueue_style( … Read more

Modify Twenty Fourteen Home Page Content Limit & Add Read More Link

The twentyfourteen index page calls get_template_part( ‘content’, get_post_format() ); inside the loop. So the content of the loop resides in template files with the name content-{$post_format}.php. All posts that does not have a post format uses content.php to display the post data If you look at content.php, these lines are where the content is retrieved … Read more

Twenty Fourteen theme and the page-templates folder

The actual query for a Theme’s page templates happens in wp_get_theme()->get_page_templates() (source), which in turn calls get_files() (source). The magic happens here: $files = (array) $this->get_files( ‘php’, 1 ); The args for get_files() are: function get_files( $type = null, $depth = 0, $search_parent = false ) {} So, when WordPress searches the Theme for PHP … Read more

Is “Featured Content” in Twenty Fourteen done with a plugin, or is it native in WP4.0?

The featured content is part of the TwentyFourteen theme, and is not implemented as a plugin, but rather as an Appearance > Customize setting (via get_theme_mod()), which allows the use of a Grid or Slider layout, choosing posts base on the tag provided. BTW, I figured this out only after reading your post! So thanks … Read more