Skip to content

Instantly share code, notes, and snippets.

/* align button on product page??? */
div.product form.cart .button {
margin-top: 0;
}
#customer_details * {
max-width: 100% !important
}
/* button colors **/
@johnnya23
johnnya23 / header-cap.css
Last active March 14, 2022 14:16
HTML and CSS for Header Cap w/ ph# & email
@media (min-width: 768px) {
.add-to-panel .wp-block-kadence-column {
-ms-flex-preferred-size: 55% !important;
flex-basis: 55% !important;
}
.add-to-panel .wp-block-kadence-column:first-child {
-ms-flex-preferred-size: 160px !important;
flex-basis: 160px !important;
-ms-flex-negative: 0 !important;
@media (min-width:768px) and (max-width: 1270px) {
.sidebar.widget-area {
margin-top: 100px
}
}
@media (min-width: 768px) {
body .jma-panel-button {
top: 140px;
}
@johnnya23
johnnya23 / custom.css
Last active February 7, 2022 20:43
Create custom display for native archives
body.archive .post, body.blog .post {
margin: 0;
padding: 1px;
border: none;
}
body.archive .post img, body.blog .post img {
width: 100%;
}
@johnnya23
johnnya23 / scrolling-local-menu.js
Last active January 5, 2022 12:58
Scrolling Local Menu in navbar
jQuery(document).ready(function($) {
var win_split = window.location.href.split('#');
function gotoid(id) {
$('html,body').animate({
scrollTop: $("#" + id).offset().top - 150
}, 500);
}
@johnnya23
johnnya23 / jma_child_gutentor_button_css_array.php
Last active January 5, 2022 12:58
Getwid Gutentor Button Filter
<?php
function jma_child_getwid_gutentor_button_css_array($css, $mods)
{
$append = array(
array(
'selector' => 'body .jma-btn-default .gutentor-button, body .jma-btn-default .gutentor-pagination-wrap .gutentor-pagination .gutentor-pagination-item .gutentor-pagination-link, body .jma-btn-default .gutentor-navigation .gutentor-next-prev li a, .pagination .page-numbers',
'color' => $mods['button_font'],
'border-style' => 'solid',
'border-color' => $mods['button_font'],
'padding' => $mods['button_vert_padding'] . 'px ' . $mods['button_hor_padding'] . 'px',
@johnnya23
johnnya23 / jma_child_single_post_link_grid_filter.php
Last active January 5, 2022 12:57
uagb grid with Images, title overlays and custom links
function jma_child_single_post_link_grid($link, $id)
{
if (function_exists('get_field') && get_field('image_link', $id)) {
$link = get_field('image_link', $id);
}
return $link;
}
add_filter("uagb_single_post_link_grid", 'jma_child_single_post_link_grid', 10, 2);
function jma_child_post_alter_attributes($atts, $id)
<?php
function JMA_child_admin_enqueue_css_js()
{
$upload = wp_upload_dir();
$upload_dir = $upload['baseurl'];
wp_enqueue_style('childmegamenu', $upload_dir . '/maxmegamenu/style.css');
$output = 'a.mega-menu-link {pointer-events:none!important}';
wp_add_inline_style('childmegamenu', $output);
}
add_action('admin_enqueue_scripts', 'JMA_child_admin_enqueue_css_js');
<?php
function jma_yt_kid_curl($url)
{
$curl = curl_init($url);
//curl_setopt($curl, CURLOPT_SSLVERSION,3);//forMAMP
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
.jma-sticky-menu .nav > li > a {
transition: all 1s;
}
.jma-sticky-menu.jma-fixed .nav > li > a {
padding-top: 11px !important;
padding-bottom: 11px !important;
}