Skip to content

Instantly share code, notes, and snippets.

View remkus's full-sized avatar

Remkus de Vries remkus

View GitHub Profile
@remkus
remkus / bulk-run.sh
Created December 5, 2023 13:24
Run WP CLI commands in Bulk
#!/bin/bash
# @link https://remkusdevries.com/wp-cli/run-wp-cli-scripts-in-bulk-across-various-servers
# List of iTerm2 profile names
profiles=(
"Example 1"
"Example 2"
"Example 3"
# ...add all profiles here
@remkus
remkus / create-wordpress-with-valet.sh
Created October 31, 2023 16:51 — forked from CoachBirgit/create-wordpress-with-valet.sh
Bash script: Use WP-CLI on Laravel/Valet to download, install and configure WordPress like a breeze.
#! /bin/bash
# Author: Birgit Olzem aka @CoachBirgit
# Version: 1.0
# Created on: January 19th 2022
# Requires WP-CLI, cURL, wget
# credits for the origin idea to Jeremy Herve: https://jeremy.hu/dev-environment-laravel-valet-wp-cli/
### How to use
@remkus
remkus / cpt-rss-include.php
Created August 18, 2016 08:32 — forked from norcross/cpt-rss-include.php
include CPT in an RSS feed
<?php
function mmk_rss_include( $query ) {
if (!$query->is_feed)
return $query;
$query->set( 'post_type' , array( 'post', 'YOUR_POST_TYPE_NAME' ) );
return $query;
@remkus
remkus / functions.php
Created August 17, 2016 08:18 — forked from srikat/functions.php
Make BuddyPress Members page obey its Page layout setting in Genesis. https://sridharkatakam.com/make-buddypress-members-page-obey-page-layout-setting-genesis/
<?php
/**
* Make BuddyPress Members page obey its Page layout setting
*/
add_filter( 'genesis_pre_get_option_site_layout', 'sk_do_members_page_layout' );
function sk_do_members_page_layout( $opt ) {
// if the current page is not the members directory, abort.
if ( ! bp_is_members_directory() ) {
@remkus
remkus / childpages-looping.php
Last active March 24, 2016 14:01 — forked from crondeau/chilpages-looping.php
I used this code to loop through child pages of a custom post type called work. Each Work piece had a title, featured image and pdf. The child pages, describe the details of the project or work piece and display as an accordion. So basically what we have is an accordion within an accordion.
<?php
// loop through the sub-pages of your custom post type
$childpages = new WP_Query( array(
'post_type' => 'wpkb-article',
'post_parent' => $this_page,
'posts_per_page' => 100,
'orderby' => 'menu_order'
));
while ( $childpages->have_posts() ) : $childpages->the_post(); ?>
# Redirect from HTTP to HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301,NC]
@remkus
remkus / extra.css
Last active January 27, 2016 15:32
Home Middle Bottom Widget
.home-footer,
.home-middle,
.home-middle-bottom {
background-color: #34678a;
box-shadow: inset 0 5px rgba(0, 0, 0, 0.1);
color: #fff;
padding: 60px 10px 60px 20px;
}
.home-footer .entry-title a,
Verifying that +remkus is my blockchain ID. https://onename.com/remkus
@remkus
remkus / Gruntfile.js
Created October 7, 2015 15:35
Gruntfile.js example
/*global node:true */
module.exports = function( grunt ) {
'use strict';
require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks );
grunt.initConfig({
makepot: {
@remkus
remkus / Gridsystem
Last active August 29, 2015 14:28 — forked from lucprincen/Gridsystem
/*
* Mixins:
*/
//make flex rows a bit easier:
@mixin flex-row( $equalize:stretch ){
@include display(flex);
@include flex-direction(row);
@include align-items($equalize);
}