Post
- post_type
- post_template
- post_status
- post_format
- post_category
- post_taxonomy
- post
| <?php | |
| /** | |
| * Generate JSON sitemap for use with UnCSS | |
| */ | |
| function show_sitemap() { | |
| if (WP_ENV === 'development' && isset($_GET['show_sitemap'])) { | |
| <?php | |
| /** | |
| * Disable Yoast SEO's darn admin bar icon | |
| */ | |
| function yoast_hide_admin_bar() { | |
| global $wp_admin_bar; | |
| $wp_admin_bar->remove_menu('wpseo-menu'); | |
| } |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
| * Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
| */ | |
| $args = array( |
| global: | |
| sql_adapter: "default" | |
| local: | |
| vhost: "http://PROJECT.dev" | |
| wordpress_path: "/srv/www/PROJECT/htdocs" # use an absolute path here | |
| database: | |
| name: "PROJECT_DB_NAME" | |
| user: "external" |
Post
| function add_theme_features() { | |
| // Add Image Sizes | |
| $containerLG = 1170; // Change this if you have updated the largest bootstrap container width. | |
| for ($i=1; $i <= 12; $i++) { | |
| add_image_size( | |
| 'col-lg-'.$i, | |
| ceil($containerLG / 12 * $i), | |
| ceil($containerLG / 12 * $i) * 10, | |
| false | |
| ); |
| <?php | |
| /** | |
| * HOME -- Slider | |
| */ | |
| $home_slider = new FieldsBuilder('home_slider'); | |
| $home_slider | |
| ->addRepeater('slider', ['min' => 1, 'max' => 5, 'layout' => 'table']) | |
| ->addImage('image') | |
| ->addText('title', [ |
| <?php | |
| /** | |
| * BASIC -- Header image | |
| */ | |
| $basic_page_header = new FieldsBuilder('basic_page_header'); | |
| $basic_page_header | |
| ->addImage('page_header_background_image') | |
| ->addText('page_header_title', [ | |
| 'instructions' => 'Leave empty to use the site title / name', |
| # group_vars/{staging & production}/wordpress_sites.yml | |
| [...] | |
| wordpress_sites: | |
| example.com: | |
| site_hosts: [...] | |
| [...] | |
| matomo: | |
| db: | |
| user: matomo | |
| host: localhost |
playing around with animeJS.
A Pen by Henning Orth on CodePen.