This file contains hidden or 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
function zip_gallery() | |
{ | |
global $post; | |
$images = get_children(array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_mime_type' => 'image', )); | |
if ($images) { | |
$save = $post->post_title; | |
$zip = new ZipArchive; | |
if ($zip->open($save . '.zip', ZIPARCHIVE::CREATE) === true) { |
This file contains hidden or 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
input { | |
-webkit-appearance: none; | |
@include border-radius(0); | |
border-radius: none; | |
-webkit-border-radius:0px; | |
} |
This file contains hidden or 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 $status = isset( $_REQUEST['subscribe'] ) ? $_REQUEST['subscribe'] : false; ?> | |
<?php if ( $status == 'invalid_email' ) : ?> | |
<p>You have entered an invalid e-mail, please try again!</p> | |
<?php elseif ( $status == 'success' ) : ?> | |
<p>Thank you for subscribing! Please check your e-mail to confirm.</p> | |
<?php else : ?> | |
<form method="POST"> | |
<input type="hidden" name="my-form-action" value="subscribe" /> | |
<input name="my-email" value="" placeholder="Enter your e-mail" /> | |
<input type="submit" /> |
This file contains hidden or 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
if(function_exists('acf_add_options_page')) { | |
acf_add_options_page(); | |
acf_add_options_sub_page('Header'); | |
acf_add_options_sub_page('Footer'); | |
} |
This file contains hidden or 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
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] ); | |
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] ); |
This file contains hidden or 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
function enable_front_page_stacks( $query ){ | |
if('' == $query->query_vars['post_type'] && 0 != $query->query_vars['page_id']) | |
$query->query_vars['post_type'] = array( 'page', 'stack' ); | |
} | |
add_action( 'pre_get_posts', 'enable_front_page_stacks' ); |
This file contains hidden or 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
function wpa18013_add_pages_to_dropdown( $pages, $r ){ | |
if('page_on_front' == $r['name']){ | |
$args = array( | |
'post_type' => 'stack' | |
); | |
$stacks = get_posts($args); | |
$pages = array_merge($pages, $stacks); | |
} | |
return $pages; |
This file contains hidden or 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
/** | |
* Adds CPTs to the list of available pages for a static front page. | |
* | |
* @param string $select Existing select list. | |
* @return string | |
*/ | |
function add_cpt_to_front_page_dropdown( $select ) | |
{ | |
if ( FALSE === strpos( $select, '<select name="page_on_front"' ) ) | |
{ |
This file contains hidden or 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
if ( get_the_post_thumbnail($post_id) != '' ) { | |
echo '<a href="'; the_permalink(); echo '" class="thumbnail-wrapper">'; | |
the_post_thumbnail(); | |
echo '</a>'; | |
} else { | |
echo '<a href="'; the_permalink(); echo '" class="thumbnail-wrapper">'; | |
echo '<img src="'; |