This will process shortcodes, parse tags etc.
(https://developer.wordpress.org/reference/functions/the_content/)
while ( have_posts() ) : the_post();This will process shortcodes, parse tags etc.
(https://developer.wordpress.org/reference/functions/the_content/)
while ( have_posts() ) : the_post();| <?php | |
| if ( ! function_exists('write_log')) { | |
| function write_log ( $log ) { | |
| if ( is_array( $log ) || is_object( $log ) ) { | |
| error_log( print_r( $log, true ) ); | |
| } else { | |
| error_log( $log ); | |
| } | |
| } | |
| } |
| <?php | |
| /** | |
| * Adding pagination for CPT section | |
| * | |
| * This is fix for using pagination on a CPT single page | |
| * | |
| * @link https://wordpress.stackexchange.com/questions/233885/yet-another-custom-post-type-with-pagination-not-working-in-wordpress | |
| * | |
| * @param $request | |
| */ |
src/assets/scss/modules/_content.scss
.main-container {
@include xy-grid-container( $grid-container, 0 );//Set $grid-container-padding to 0
}
.main-grid {
// Default template| <?php | |
| /** | |
| * WooCommerce compatibility | |
| * | |
| * Add this if you want to use the 'woocommerce.php' file. | |
| * | |
| * @link: https://github.com/olefredrik/FoundationPress/issues/982 | |
| */ | |
| add_action( 'after_setup_theme', function() { | |
| add_theme_support( 'woocommerce' ); |
https://github.com/garand/sticky
This gist describes how to install Garand Sticky into FoundationPress https://github.com/olefredrik/FoundationPress
| <?php | |
| # Truncate string | |
| function truncate($string,$length=170,$append="…") { | |
| $string = trim($string); | |
| if(strlen($string) > $length) { | |
| $string = wordwrap($string, $length); | |
| $string = explode("\n", $string, 2); | |
| $string = $string[0] . $append; | |
| } |
Filter & sort layouts
npm: npm install isotope-layout --save
Bower: bower install isotope-layout --save
Sticky header with slide down and up effect for use with FoundastionPress.
FoundationPress is a WordPress starter theme based on Foundation 6 by Zurb https://foundationpress.olefredrik.com