Custom select box for Firefox while we are waiting for the release of 35!!
A Pen by Thiago Lagden on CodePen.
# BEGIN redirect to homepage | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/$ | |
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js|php)$ | |
RewriteCond %{REQUEST_URI} !^/wp-admin [NC] | |
RewriteRule .* / [L,R=301] | |
#END redirect to homepage |
// Usage: | |
// get_id_by_slug('any-page-slug'); | |
function get_id_by_slug($page_slug) { | |
$page = get_page_by_path($page_slug); | |
if ($page) { | |
return $page->ID; | |
} else { | |
return null; | |
} |
<?php | |
/** | |
* Remove the slug from published post permalinks for our custom post types. | |
*/ | |
add_filter( 'post_type_link', function( $post_link, $post, $leavename ) { | |
$post_types = array( | |
'post_type_1', | |
'post_type_2' | |
); |
<?php | |
/* | |
Extends Visual Composer | |
More information can be found here: http://kb.wpbakery.com/index.php?title=Category:Visual_Composer | |
*/ | |
// don't load directly |
<?php | |
function the_date_range($args) { | |
global $post; | |
$default = array( | |
'start_field' => 'start_date', | |
'end_field' => null, | |
'base_format' => 'Ymd', | |
'post_id' => $post->ID, | |
'separator' => '<span class="date-separator">–</span>', | |
'month_format' => 'F', |
/** | |
* Only display minimum price for WooCommerce variable products | |
**/ | |
add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2); | |
function custom_variation_price( $price, $product ) { | |
$price = ''; | |
<div class="post-editor-block" id="post-editor-audio-fields" style="display: none;"> | |
<label for="post-editor-audio-embed"><?php _e('Audio URL (oEmbed) or Embed Code', 'post-format'); ?></label> | |
<textarea name="_format_audio_embed" id="post-editor-audio-embed" tabindex="1"><?php echo esc_textarea(get_post_meta($post->ID, '_format_audio_embed', true)); ?></textarea> | |
</div> |
DELETE FROM wp_posts; | |
DELETE FROM wp_post_meta; | |
TRUNCATE TABLE wp_posts; | |
TRUNCATE TABLE wp_post_meta; |
# Don't show errors which contain full path diclosure (FPD) | |
# Use that line only if PHP is installed as a module and not per CGI | |
# try using a php.ini in that case. | |
# Change mod_php5.c to mod_php7.c if you are running PHP7 | |
<IfModule mod_php5.c> | |
php_flag display_errors Off | |
</IfModule> | |
# Don't list directories | |
<IfModule mod_autoindex.c> |
Custom select box for Firefox while we are waiting for the release of 35!!
A Pen by Thiago Lagden on CodePen.