Skip to content

Instantly share code, notes, and snippets.

View paullacey78's full-sized avatar

Paul Lacey paullacey78

View GitHub Profile
<?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>';
<?php
function check_field_connections( $is_visible, $node ) {
if ( isset( $node->settings->connections ) ) {
foreach ( $node->settings->connections as $key => $connection ) {
if ( ! empty( $connection ) && empty( $node->settings->$key ) ) {
return false;
}
}
}
/* 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) {
@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;
}
@media(min-width:768px) {
#wpadminbar {
opacity: 0;
transition: all 0.5s ease;
}
#wpadminbar:hover {
opacity: 1;
}
body.admin-bar {
margin-top: -32px !important;
.fl-row-full-height .fl-row-content-wrap {
min-height: calc(100vh - 282px);
}
.full_width-editorial > .fl-row-content-wrap {
padding: 0 6%;
}
@media(min-width: 841px) {
.inside-header {
display: flex;
align-items: center;
}
.site-logo {
width: 20%;
}
.site-logo:not(.sticky-logo) img {
width: 140px;
<?php
add_filter( 'generate_default_color_palettes', 'tu_custom_color_palettes' );
function tu_custom_color_palettes( $palettes ) {
$palettes = array(
'#000000',
'#FFFFFF',
'#F1C40F',
'#E74C3C',
'#1ABC9C',
'#1e72bd',