Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
function derweili_change_postnumber_imagegallerycat( $query ) { | |
if ( $query->is_main_query() && $query->is_tax('bildergalerien-kategorie') ) { | |
$query->set('posts_per_page', 50); | |
return; | |
} | |
} | |
add_action( 'pre_get_posts', 'derweili_change_postnumber_imagegallerycat' ); |
<?php | |
/** | |
Overwrite WordPress Gallery with Zurb Foundation Orbit Carousel | |
http://foundation.zurb.com/sites/docs/orbit.html | |
*/ | |
add_filter( 'post_gallery', 'my_custom_foundation_gallery', 10, 2 ); | |
function my_custom_foundation_gallery( $output, $attr ) { |
d |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
const { | |
subscribe, | |
select | |
} = wp.data; | |
/** | |
* Add dark-mode class to block-editor based on selected page template | |
*/ | |
wp.domReady( () => { | |
const postType = select( 'core/editor' ).getCurrentPostType(); |
remove_action( 'setup_theme', array( 'CDN_Enabler_Engine', 'start' ) ); | |
add_action( 'template_redirect', array( 'CDN_Enabler_Engine', 'start' ), 20 ); |
mkdir ~/bin | |
mkdir ~/bin/wp-cli | |
cd ~/bin/wp-cli | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
echo "export COLUMNS" >> ~/.bashrc | |
echo "alias wp='php ~/bin/wp-cli/wp-cli.phar'" >> ~/.bashrc | |
echo "alias php='/usr/bin/php'" >> ~/.bashrc | |
source ~/.bashrc | |
echo "PATH=$HOME/bin:$PATH" >> ~/.bashrc |