Skip to content

Instantly share code, notes, and snippets.

View lincolnlemos's full-sized avatar

Lincoln Lemos lincolnlemos

View GitHub Profile
@lincolnlemos
lincolnlemos / functions.php
Created October 14, 2017 18:51 — forked from cjmosure/functions.php
WP-PageNavi - Bootstrap 4
<?php
/**
* Clean up pagination
*/
add_filter( 'wp_pagenavi', __NAMESPACE__ . '\\gc_pagination', 10, 2 );
function gc_pagination($html) {
$out = '';
$out = str_replace('<div','',$html);
$out = str_replace('class=\'wp-pagenavi\'>','',$out);
<?php if( have_rows('collapse') ): ?>
<div id="accordion" role="tablist">
<?php $i=1; while ( have_rows('collapse') ) : the_row(); ?>
<div class="card">
<div class="card-header" role="tab" id="heading-<?php echo $i; ?>">
<h5 class="mb-0">
<a data-toggle="collapse" href="#collapse-<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne">
<?php the_sub_field('title'); ?>
</a>
</h5>
<?php
/**
* Custom Loop Add to Cart.
*
* Template with quantity and ajax.
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
global $product;
@lincolnlemos
lincolnlemos / gist:3943197
Created October 24, 2012 01:37 — forked from bueltge/gist:757903
This WordPress Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
<?php
/*
Plugin Name: HowTo Plugin
Plugin URI:
Description: This Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
Author: Heiko, Frank
Author URI: http://bueltge.de
Version: 0.1
License: