Skip to content

Instantly share code, notes, and snippets.

@neilgee
neilgee / featured-loop.php
Last active Oct 13, 2020
WooCommerce Featured Products - Featured Image Loop
View featured-loop.php
@neilgee
neilgee / wc-image-loop.php
Created Oct 2, 2020
WooCommerce Featured Image Loop
View wc-image-loop.php
<?php //<~ don't add me in
add_shortcode ('woo_featured_image', 'woo_featured_image_loop' );
/**
* Create WooCommerce Featured Image Loop Slider
*/
function woo_featured_image_loop() {
ob_start();
// Setup your custom query
@neilgee
neilgee / tag-gone.php
Created Aug 18, 2020
Remove Product Tags from Products in WooCommerce
View tag-gone.php
<?php //<~ don't add me in
/**
* Remove Product Tags from Products Post Type - WooCommerce
* @link https://rudrastyh.com/woocommerce/remove-product-tags.html
* @author Misha Rudrastyh
*/
add_action( 'admin_menu', 'themeprefix_hide_product_tags_admin_menu', 9999 );
function themeprefix_hide_product_tags_admin_menu() {
@neilgee
neilgee / wp-create.sh
Last active May 16, 2020
Shell Scipt for local WordPress creation using Valet
View wp-create.sh
#!/bin/bash
# Ref wp-cli-valet - https://github.com/aaemnnosttv/wp-cli-valet-command
# Set up Terminal styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
@neilgee
neilgee / accordion-repeater-shortcode.php
Last active Aug 5, 2020
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 Jun 21, 2020
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 );
You can’t perform that action at this time.