Skip to content

Instantly share code, notes, and snippets.

Neil Gowran neilgee

Block or report user

Report or block neilgee

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
@neilgee
neilgee / accordion-repeater-shortcode.php
Last active Oct 6, 2019
Bootstrap Accordion ACF Repeater
View accordion-repeater-shortcode.php
<?php //<~ don't add me in - add the code below in functions.php
add_shortcode( 'wpb_bs_accordion_acf', 'wpb_bs_accordion_acf' );
/**
* Bootstrap Accordion Repeater Field
*/
function wpb_bs_accordion_acf() {
ob_start();
@neilgee
neilgee / carouse-nav-indicators.php
Last active Oct 7, 2019
Bootstrap carousel ACF Repeaters
View carouse-nav-indicators.php
<?php
// *Repeater
// carousel_repeater
// *Sub-Fields
// carousel_image
// carousel_text
// check if the repeater field has rows of data
if( have_rows('carousel_repeater') ):
View accordion-acf-repeater-loop-shortcode.php
<?php //<~ don't add me in - code below goes into functions.php
add_shortcode( 'wpb_accordion_acf', 'wpb_accordion_acf' );
/**
* Accordion Repeater Field
*/
function wpb_accordion_acf() {
ob_start();
// *Repeater
View bootstrap-tab-accordion-loops-shortcode.php
<?php // <~ don't add me in - add the below code in functions.php
add_shortcode( 'wpb_while_tabs_accordion_acf', 'wpb_while_tabs_accordion_acf' );
/**
* Bootstrap While Tabs Loop
*/
function wpb_while_tabs_accordion_acf() {
ob_start();
// *Repeater
@neilgee
neilgee / foreach-modal.php
Last active Sep 29, 2019
Bootstrap ACF Foreach & While Loop of Modals
View foreach-modal.php
<?php
$modals = array( 'modal1', 'modal2', 'modal3', 'modal4' );// Set the array
$i = 1; // Set the increment variable
foreach( $modals as $modal ):
?>
<!-- Button to Open the Modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal-<?php echo $i; // Displaying the increment ?>">
@neilgee
neilgee / frontend.php
Last active Jul 3, 2019
Beaver Builder Post Grid Override - Moving Pagination into Post Grid container
View frontend.php
<?php
// Get the query data.
$query = FLBuilderLoop::query( $settings );
// Render the posts.
if ( $query->have_posts() ) :
do_action( 'fl_builder_posts_module_before_posts', $settings, $query );
@neilgee
neilgee / change-search-form.php
Last active Apr 7, 2019
Add Search Toggle at End of Menu
View change-search-form.php
<?php //<~ don't add me in
add_filter( 'get_search_form', 'wpb_alter_search_form', 20 );
// Modify Search Form
function wpb_alter_search_form( $form ){
return '<form role="search" method="get" id="searchform" action="' . esc_url( home_url( '/' ) ) . '" >
<input type="search" name="s" placeholder="SEARCH..." value/>
</form>';
}
@neilgee
neilgee / isotope-init.js
Last active Mar 19, 2019
Isotope Filter Custom Taxonomy on CPT Archive Page
View isotope-init.js
jQuery(document).ready(function($){
var $grid = $('.grid').isotope({
itemSelector: '.grid-item',
percentPosition: true,
layoutMode: 'fitRows',
});
// Layout Isotope after each image loads
$grid.imagesLoaded().progress( function() {
@neilgee
neilgee / custom-tax.php
Last active Mar 19, 2019
Output a Custom Taxonomy Loop of Terms
View custom-tax.php
<?php
// Taxonomy Loop
/**
* Get the Custom Taxonomy
* For a list of other parameters to pass in see link below
* @link https://developer.wordpress.org/reference/classes/wp_term_query/__construct/
* For a list of get_term return values see link below
* @link https://codex.wordpress.org/Function_Reference/get_term
@neilgee
neilgee / login-out.php
Last active Mar 15, 2019
Login/Logout Shortcode
View login-out.php
<?php //<~ remove if using in functions.php
add_shortcode( 'login_logut', 'login_logut' );
/**
* Add a login/logout shortcode button
* @since 1.0.0
*/
function login_logut() {
ob_start();
if (is_user_logged_in()) :
You can’t perform that action at this time.