Skip to content

Instantly share code, notes, and snippets.

View MariaJackson1's full-sized avatar

Maria Jackson MariaJackson1

View GitHub Profile
@MariaJackson1
MariaJackson1 / Web Fonts
Last active May 16, 2023 19:26
Web Fonts #adobe #web fonts #custom fonts
https://google-webfonts-helper.herokuapp.com/fonts/inter?subsets=latin
Hook Element: Preload Fonts
<link rel="preload" as="font" type="font/woff2" href="https://domain.com/wp-content/fonts/poppins-v15-latin-regular.woff2" crossorigin="anonymous">
<link rel="preload" as="font" type="font/woff2" href="https://domain.com/wp-content/fonts/luthier-regular.woff2" crossorigin="anonymous">
<link rel="preload" as="font" type="font/woff2" href="https://domain.com/wp-content/fonts/josefin-sans-v17-latin-regular.woff2" crossorigin="anonymous">
<link rel="preload" as="font" type="font/woff2" href="https://domain.com/wp-content/fonts/poppins-v15-latin-500.woff2" crossorigin="anonymous">
<link rel="preload" as="font" type="font/woff2" href="https://domain.com/wp-content/fonts/poppins-v15-latin-600.woff2" crossorigin="anonymous">
@MariaJackson1
MariaJackson1 / Center Logo in Navigation
Created September 23, 2022 22:49
untitled #center logo #navigation
/* =============== Center Logo ============= */
@media(min-width: 769px) {
.inside-header>.site-branding,
.inside-header>.navigation-branding,
.inside-header>.site-logo,
.site-branding-container,
#site-navigation .navigation-branding .site-logo,
#sticky-navigation .navigation-branding {
position: absolute;
left: 50%;
@MariaJackson1
MariaJackson1 / Custom Font @font-face
Last active September 15, 2022 19:59
Custom Fonts @font-face #typography #fonts
https://docs.generatepress.com/article/adding-local-fonts/
https://google-webfonts-helper.herokuapp.com/fonts
/* Local Fonts */
/* oswald-600 - latin */
@font-face {
font-family: 'Oswald';
font-style: normal;
font-weight: 600;
font-display: swap;
@MariaJackson1
MariaJackson1 / Custom WordPress login page
Last active August 9, 2022 22:10 — forked from anonymous/functions.php
Custom Login Page #dev
// Custom login page
function my_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(/images/logo.png);
padding-bottom: 45px;
background-size: 285px;
height: 100%;
width: 100%;
}
@MariaJackson1
MariaJackson1 / Replace Howdy With Hello
Last active August 9, 2022 22:05
Replace Howdy With Hello #dev
/**
* Replace Howdy With Hello
*/
function replace_howdy( $wp_admin_bar ) {
$my_account=$wp_admin_bar->get_node('my-account');
$newtitle = str_replace( 'Howdy,', 'Hello,', $my_account->title );
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $newtitle,
@MariaJackson1
MariaJackson1 / Enable WordPress to Upload SVG
Last active August 9, 2022 22:00
Add to functions.php #dev
function my_myme_types($mime_types){
$mime_types['svg'] = 'image/svg+xml';
return $mime_types;
}
add_filter('upload_mimes', 'my_myme_types', 1, 1);
@MariaJackson1
MariaJackson1 / Add Color Overlay to Background Image.txt
Last active August 9, 2022 21:59
Add Color Overlay to Background Image #css
.bg-img {
background: linear-gradient(rgba(232, 66, 244,0.7),rgba(98, 65, 244,0.1)), url(https://picsum.photos/2000/1080/?image=1068);
background-position: center;
background-size: cover;
background-repeat: no-repeat;
height: 100vh;
}
@MariaJackson1
MariaJackson1 / ACF Repeater Fields
Last active August 9, 2022 21:58
ACF Repeater Fields #dev
https://www.youtube.com/watch?v=VBVum5VoYKE
<?php
/*
Template Name: Bakery Menu Template
*/
get_header(); ?>
@MariaJackson1
MariaJackson1 / Buttons GeneratePress Styling Buttons
Last active August 8, 2022 21:17
Styling Buttons GeneratePress
https://generatepress.com/forums/topic/custom-colors-for-buttons/#post-143266
.button,
.button:visited {
display: inline-block;
*display: inline;
*zoom:1;
padding: 10px 15px;
font-size: 17px;
@MariaJackson1
MariaJackson1 / Remove "Month:" Blog Archive Title
Last active August 8, 2022 21:16
Remove "Month:" Blog Archive Title
Add to functions.php
add_filter( 'get_the_archive_title', 'tu_remove_month_archive_title' );
function tu_remove_month_archive_title( $title ) {
if ( is_month() ) {
$title = get_the_date( 'F Y' );
}
return $title;
}