Content template when adding a new page

Use shortcodes with as many attributes as you want. add_shortcode(‘custom-display-of-data’, ‘custom_display_of_data’); function custom_display_of_data($atts) { $atts = shortcode_atts( array( ‘foo’ => false, // default foo is false ‘bar’ => ‘default bar’, // default bar is string: default bar // define defaults for as many attributes you need ), $atts, ‘custom-display-of-data’ ); // place your code here … Read more

Post gallery as carousel

Use the same gallery shortcode generated in the visual editor, then add an attribute to note carousel. That way you piggyback on all the functionality with very little extra effort required. See this answer for how to approach this by replacing the default gallery shortcode.

Custom templates stopped working

So, after all, it was a wordpress bug apparently… The problem is I was registering the following year taxonomy: register_taxonomy(‘year’, array(‘project’), array( ‘hierarchical’ => true, ‘labels’ => array(‘name’ => ‘Anos’, ‘singular_name’ => ‘Ano’), ‘show_ui’ => true, ‘public’ => false )); And it seems year is a reserved word for WP’s rewriting rules, and it must … Read more