Skip to content

Instantly share code, notes, and snippets.

View paullacey78's full-sized avatar

Paul Lacey paullacey78

View GitHub Profile
@paullacey78
paullacey78 / move-wp-bar-bottom-in-mobile.css
Last active December 17, 2017 22:58
Move the wp-admin bar to the bottom of the screen in mobile view
/* Move the wp-admin bar to the bottom when in mobile view */
@media(max-width:782px) {
#wpadminbar {
bottom: 0;
position: fixed;
top: initial;
}
body.logged-in.admin-bar {
margin-top: -46px;
}
/* Move the wp-admin bar to the bottom */
#wpadminbar {
bottom: 0;
position: fixed;
top: initial;
}
body.logged-in.admin-bar {
margin-top: -32px;
}
@media(max-width:782px) {
<?php
/* Shortcode to add parent title above main title if exists */
add_shortcode( 'page_parent', 'output_page_parent' );
function output_page_parent() {
global $post;
$post_parentID = $post->post_parent;
if($post_parentID) {
$output = '<h4><a href="'.get_permalink( $post_parentID ).'">'.get_the_title( $post_parentID ).' ></a></h4>';
}
$output .= '<h1>'.get_the_title( $post ).'</h1>';
@media(min-width: 841px) {
.inside-header {
display: flex;
align-items: center;
}
.site-logo {
width: 20%;
}
.site-logo:not(.sticky-logo) img {
width: 140px;
/* # GENERATEPRESS HEADER # */
/* GeneratePress header fix for phablets & small tablets
Change the 1024px value in two places to where you have nav/logo overlap */
@media(min-width: 841px) {
.inside-header {
display: flex;
align-items: center;
}
.site-logo {
width: 20%;
function classToggle() {
this.classList.toggle('class1');
this.classList.toggle('class2');
}
document.querySelector('#div').addEventListener('click', classToggle);
.fl-builder-module-template {
padding: 0;
}
@paullacey78
paullacey78 / gp-bb.css
Last active September 23, 2018 16:51
Force GP into full width, hide page header & title and force layout to no sidebar with Beaver Builder is active on a page.
/* PAGE HEADER */
/* Hide the page header when BB is active on a page */
.hide-page-header .generate-page-header,
.hide-page-header .page-header-image,
.hide-page-header .page-header-image-single {
display:none;
}
/* Unhide the page header when BB is active but we want to use GP custom page header */