Skip to content

Instantly share code, notes, and snippets.

@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(); ?>
@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);
}
@remkus
remkus / aauthorbox.php
Last active August 29, 2015 14:26 — forked from neilgee/aauthorbox.php
Genesis WordPress Customised Author Box
<?php
//do not copy the opening php tag above
/**
* Changing the AuthorBox in WordPress
*
* @package Changing the AuthorBox in WordPress
* @author Neil Gee
* @link http://wpbeaches.com/author-box-genesis/
<?php
class Yoast_GlotPress_SEO {
function __construct() {
add_filter( 'gp_title', array( $this, 'modify_title' ) );
add_action( 'gp_head', array( $this, 'meta_desc' ), 9 );
add_filter( 'gp_redirect_status', array( $this, 'modify_redirect_status' ), 10, 2 );
}
module.exports = function( grunt ) {
'use strict';
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks );
grunt.initConfig({
makepot: {
plugin1: {
options: {