This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add meta fields support in rest API for post type `Post` | |
* | |
* This function will allow custom parameters within API request URL. Add post meta support for post type `Post`. | |
* | |
* > How to use? | |
* http://mysite.com/wp-json/wp/v2/posts?meta_key=<my_meta_key>&meta_value=<my_meta_value> | |
* | |
* > E.g. Get posts which post meta `already-visited` value is `true`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install --save scrollreveal or install like you're used to doing it. | |
// It doesn't work well if there are multiple instances of ScrollReveal, | |
// so we have to create a module returning an instance: | |
// file ScrollReveal.js: | |
import ScrollReveal from 'scrollreveal' | |
export default ScrollReveal() | |
// Then in a component: | |
import React from 'react' | |
import sr from './ScrollReveal' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Excludes child terms from the main query on the category archive. | |
* | |
* @param object $query the WP_Query instance | |
* @return void | |
* @access public | |
*/ | |
function rk_fix_tax_queries_on_archives( $query ) { |