Skip to content

Instantly share code, notes, and snippets.

Remkus de Vries remkus

Block or report user

Report or block remkus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@remkus
remkus / cpt-rss-include.php
Created Aug 18, 2016 — forked from norcross/cpt-rss-include.php
include CPT in an RSS feed
View cpt-rss-include.php
<?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 Aug 17, 2016 — 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/
View functions.php
<?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 Mar 24, 2016 — 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.
View childpages-looping.php
<?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(); ?>
View .htaccess
# 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 Jan 27, 2016
Home Middle Bottom Widget
View extra.css
.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,
View one
Verifying that +remkus is my blockchain ID. https://onename.com/remkus
@remkus
remkus / Gruntfile.js
Created Oct 7, 2015
Gruntfile.js example
View Gruntfile.js
/*global node:true */
module.exports = function( grunt ) {
'use strict';
require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks );
grunt.initConfig({
makepot: {
View Gridsystem
/*
* Mixins:
*/
//make flex rows a bit easier:
@mixin flex-row( $equalize:stretch ){
@include display(flex);
@include flex-direction(row);
@include align-items($equalize);
}
View yoast-seo-subdomain-sitemap-include.php
<?php
add_filter('wpseo_sitemap_index', 'add_subdomains_to_sitemap' ); // add link to custom sitemap
/**
* Add the link to the main sitemap index
* @param string $content Existing sitemap content.
* @return string Sitemap with extra content.
*/
function add_subdomains_to_sitemap( $content = '' ) {
@remkus
remkus / aauthorbox.php
Last active Aug 29, 2015 — forked from neilgee/aauthorbox.php
Genesis WordPress Customised Author Box
View aauthorbox.php
<?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/
You can’t perform that action at this time.