How many of you are:
From the Codex:
A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a weblog
In other words: a WordPress theme takes care of the presentation of your WordPress site.
… because It’s easier to be/to start with the negative :)))
“query post() is bad and you should never use it”
– Andrew Nacin, WordPress Lead Developer

wp_enqueue_style();
wp_enqueue_script();
add_action( 'wp_enqueue_scripts', 'textdomain_enqueue_style' );
add_action( 'wp_enqueue_scripts', 'textdomain_enqueue_script' );
add_action( 'admin_enqueue_scripts', 'textdomain_load_custom_wp_admin_style' );
<body <?php body_class(); ?>>
<body <?php body_class( 'my-custom-body-class-here' ); ?>>
add_filter( 'body_class', 'masonry_body_classes' );
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
// add a custom class if you need <article id="post-<?php the_ID(); ?>" <?php post_class( 'entry' ); ?>>
<?php /* * Template Name: My Page Template Name */ ?>
In most cases I’m using:
<?php get_template_part( 'single', get_post_format() ); ?>
<?php get_template_part( 'single', get_post_type() ); ?>
<?php get_template_part( 'single', 'aircraft' ); ?>
will do a PHP require() for the first file that exists among these, in this priority:
wp-content/themes/mytheme-child/single-aircraft.php wp-content/themes/mytheme/single-aircraft.php wp-content/themes/mytheme-child/single.php wp-content/themes/mytheme/single.php
style.css:
Text Domain: masonry
Use your text domain for function prefix:
function masonry_setup() { // Your code here }
<?php // WP PageNavi wp_pagenavi(); ?>
<?php if ( function_exists( 'mc4wp_form' ) ) { mc4wp_form(); } ?>
// Footer Text Widget [contact-form-7 id="224" title="Footer Contact Form"]
function masonry_setup() { // ******************* Localizations ****************** // load_theme_textdomain( 'masonry', get_template_directory() . '/languages' ); // here goes the rest of your code } add_action( 'after_setup_theme', 'masonry_setup' );
/** * Theme Name: Masonry Child Theme * Template: masonry */ @import url(../masonry/style.css); /* Masonry Child Theme CSS */
function my_child_theme_scripts() { // Masonry parent style wp_enqueue_style( 'masonry-theme-css', get_template_directory_uri() . '/style.css' ); } // Faster than @import add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' );
if ( ! function_exists( 'masonry_setup' ) ) { function masonry_setup() { // Do stuff here } }
define( 'WP_DEBUG', true );
error_reporting( E_ALL ); ini_set( 'display_errors', 'yes' );
define( 'SCRIPT_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'DISALLOW_FILE_EDIT', true ); // Disable theme/plugin editor
if ( wp_is_mobile() ) { /* Display and echo mobile specific stuff here */ }
is_front_page(); is_home():is_archive(); is_single(); is_singular(); is_search(); is_page(); // and so on