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
add_action('save_post', 'myweb_duplicate_product', 10, 3); | |
function myweb_duplicate_product($post_id, $post, $update) { | |
$new_or_existing = ''; | |
// only sync products from child sites, do nothing if its the parent site | |
if(get_current_blog_id() != 1){ | |
// check if the post is new or if it is being updated | |
$myPost = get_post($post_id); | |
if( $myPost->post_modified_gmt == $myPost->post_date_gmt ){ | |
// new product | |
$new_or_existing = 'new'; |
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
// add our custom Page Title after the Site Header | |
add_action( 'fl_after_header', 'bb_after_header' ); | |
function bb_after_header() { | |
// most home pages will be custom pages so we don't want to ouput the custom Page Title on the home page | |
if(!is_front_page()){ | |
// get the value of the ACF background file we uploaded to the field. | |
// If you named your field a different name to $bb_page_title_bg, replace this with your field name | |
$bb_page_title_bg = get_field('bb_page_title_background'); | |
// the below outputs the field. As the BB theme runs on Boostrap, we're using some |
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
/* Add this into your style.css or whever else you'd like to add your CSS | |
- any rows with the CSS class bg-color-mobile will have the background image hidden on small devices */ | |
@media only screen and (max-width: 767px) { | |
.bg-color-mobile .fl-row-content-wrap{background-image:none;} | |
} |
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
// add previous / next posts to single posts | |
// change fl_post_bottom_meta_open to the hook that is appropriate to your theme. Genesis would use genesis_before_comments as the hook | |
add_action( 'fl_post_bottom_meta_open', 'eo_prev_next_post_nav' ); | |
function eo_prev_next_post_nav() { | |
if ( is_single() ) { ?> | |
<div class="navi-previous-next clear clearfix"> | |
<div class="navi-previous navi-item"> <?php | |
$prevPost = get_previous_post(); |
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
/* ---------------------- | |
SINGLE POSTS | |
---------------------- */ | |
/* SINGLE POST NAVIGATION - PREVIOUS / NEXT */ | |
.navi-previous-next{clear:both;font-style:normal;} | |
.navi-previous-next img{max-width:100%;height:auto;margin-bottom:5px;} | |
.navi-previous-next .navi-item{width:48%;float:left;margin-left:4%;margin-bottom:30px;} | |
.navi-previous-next .navi-previous{margin-left:0;text-align:left;} | |
.navi-previous-next .navi-next{text-align:right;} |
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
/* Make the header transparent */ | |
body .fl-page-header-primary{ | |
background:transparent; | |
position:relative; | |
z-index: 10; | |
} | |
/* Remove the bottom border from the header | |
// if you do not add this there will be a faint line under your header */ | |
header .fl-page-header-wrap { border-bottom: 0; } |
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
/* FOR GREATER THAN THE MEDIUM DEVICE BREAKPOINT */ | |
@media screen and (min-width: 993px) { | |
/* ROW STYLING */ | |
.top-banner .fl-row-content-wrap{ | |
margin-top: -115px; | |
padding-top: 200px; | |
padding-bottom: 80px; | |
} | |
} |
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
body .fl-page-header-primary, body .fl-page-bar{ | |
background:transparent; | |
position:relative; | |
z-index: 10; | |
} |
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
/* Let's only convert the blog posts to a grid layout on medium devices and above */ | |
@media only screen and (min-width: 992px) { | |
/* BLOG LAYOUT TO CONVERT IT TO A GRID with 2 blog posts across the row */ | |
.fl-archive .fl-post{width:48%;float:left;margin-left:4%;} | |
.fl-archive .fl-post:nth-child(odd){margin-left:0;clear:both;} | |
} |
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
/* Let's only convert the blog posts to a grid layout on medium devices and above */ | |
@media only screen and (min-width: 992px) { | |
/* BLOG LAYOUT TO CONVERT IT TO A GRID with 3 blog posts across the row */ | |
.fl-archive .fl-post{width:30%;float:left;margin-left:5%;} | |
.fl-archive .fl-post:nth-child(3n+1){margin-left:0;clear:both;} | |
} |
OlderNewer