These changes need to be made in your active wp-config.php
file in order to be used (or dumped in a wp-config-local.php
file).
<?php
/* PHP errors, notices and warnings will be displayed */
This is a comparison of a default 'WordPress' template and the same template re-written to instead use Timber/TWIG to separate the coding from the theming.
Example Code:
This is for a custom-post type named 'Books' and the template-file is correctly named archive-books.php
.
Depending on the scenario, there are a number of 'templates' that could make work a little easier if previously templated.
Creating tasks, creating large feature requests, commenting on changes to insurance
updates, and so on.
The linked / associated gists provide an initial draft of example templates, which can hopefully be built upon.
function custom_columns( $columns ) { | |
$columns = array( | |
'cb' => '<input type="checkbox" />', | |
'featured_image' => 'Image', | |
'title' => 'Title', | |
'comments' => '<span class="vers"><div title="Comments" class="comment-grey-bubble"></div></span>', | |
'date' => 'Date' | |
); | |
return $columns; | |
} |
<?php | |
/** | |
* Note: If using Timber, a generated anchor is avaiable via {{ block.id }} | |
* This approach requires creating a custom 'anchor_id' field and/or using PHP to custom-generate one. | |
*/ | |
$anchor_id = get_sub_field( 'anchor_id' ); | |
?> | |
function cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |