This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div class="container-fluid"> | |
<div class="content"> | |
<main role='main'> | |
<?php | |
$query_404 = new WP_Query(array( | |
'posts_per_page' => 1, | |
'post_type' => 'page', | |
'post_name' => '404-error' | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'recipe/common.php'; | |
// Set configurations | |
set('repository', 'ssh://gogs@git.server.com:22/user/repo.git'); | |
set('shared_files', ['public/wp-config.php']); | |
set('shared_dirs', ['public/wp-content/uploads']); | |
set('writable_dirs', []); | |
set('keep_releases', 10); | |
set('composer_command', 'composer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: skeleton | |
# Required-Start: $remote_fs $networking | |
# Required-Stop: $remote_fs $networking | |
# Should-Start: pulseaudio alsa-utils hostname | |
# Should-Stop: pulseaudio alsa-utils hostname | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Contact Form 7 Post Title shortcode | |
Plugin URI: | |
Description: Use in form: [post_title thetitle] - use in email (to get value): [thetitle] | |
Version: 2014.04.07 | |
Author: khromov | |
Author URI: http://profiles.wordpress.org/khromov/ | |
License: GPL2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper function for including templates | |
* | |
* @param $template | |
*/ | |
function include_template($template, $args) | |
{ | |
extract($args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('wpinstant_prerendered_urls', function($urls) { | |
if ( is_front_page() ) { | |
$posts = array( 1,2,3); | |
foreach($posts as $post) { | |
$permalink = get_permalink( $post ); | |
if($permalink) { | |
$urls[] = $permalink; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width"> | |
<title>Rock, Paper, Scissors</title> | |
<style> | |
*{margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}::selection{background:#fb9fe5;text-shadow:none}a{color:#0088CC;text-decoration:none;outline:0}a:hover{color:#005580}a img{border:none}img{max-width:100%}html{font-size:100%}body{padding:5%;font:300 1.25em/1.6 monospace;background:#fff;color:#000;}h1{font-family:"Helvetica Neue",sans-serif;line-height:1;font-weight:300;margin-bottom:1em;}.game{padding:2em;background:#eee;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('wpinstant_prerendered_urls', function($urls) { | |
if ( is_home() ) { | |
$args = array( | |
'meta_key'=> 'prefetch_on_home', | |
'meta_value' => true | |
); | |
$query = new WP_Query( $args ); | |
if ( $query->have_posts() ) { | |
foreach( $query->posts as $post ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* Grid portion of Bootstrap under sc- namespace. | |
* Classes: | |
* sc-container-fluid, sc-row, sc-col-X-Y (like regular B3) | |
* | |
* For more info, see: | |
* http://snippets.khromov.se/decoupled-bootstrap-3-grid/ | |
* | |
* Bootstrap v3.2.0 (http://getbootstrap.com) | |
* Copyright 2011-2014 Twitter, Inc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$post_id = 1; //Post ID | |
$post_taxonomies = get_field('assigned-taxonomies', $post_id); | |
$args = array( | |
'post_type' => 'post', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'your-taxonomy', | |
'field' => 'term_id', | |
'terms' => $post_taxonomies |