Skip to content

Instantly share code, notes, and snippets.

@zephyrmike
zephyrmike / htaccess-redirects.txt
Last active September 27, 2019 22:22
Useful HTACCESS Rules
/* http to https with www to non-www */
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
/* http to https with non-www to www */
@zephyrmike
zephyrmike / generatepress-fonts.php
Last active August 5, 2022 21:39
Add Fonts to GeneratePress Customizer
add_filter( 'generate_typography_default_fonts', 'tu_add_typekit_fonts' );
function tu_add_typekit_fonts( $fonts ) {
$fonts[] = 'font-name';
return $fonts;
}
@zephyrmike
zephyrmike / gp-nav-buttons.css
Created May 22, 2020 22:29
GeneratePress Navigation Buttons
/* first button */
.main-navigation:not(.slideout-navigation) .main-nav li.first-button a {
background-color: rgba(178,139,178,1.0);
color: #ffffff;
border: 0;
line-height: 40px;
padding: 0px 24px;
border-radius: 50px;
margin-left: 20px;
@zephyrmike
zephyrmike / gpgb-course.css
Last active March 20, 2022 16:04
GP&GB Course CSS
/* adds letter spacing to the main navigation */
.main-navigation a {
letter-spacing: 1px;
}
/* adds rounded corners to the GeneratePress blog archive photo & post featured image*/
.featured-image img,
.post-image img {
border-radius: 8px;
}
@zephyrmike
zephyrmike / mc4wp.css
Last active June 10, 2023 00:46
MailChimp for WordPress (MC4WP) Plugin Styling
/* plugin located at https://wordpress.org/plugins/mailchimp-for-wp/ */
/* form alignment */
.mc4wp-form-fields {
text-align: center;
}
/* form text and email fields style */
@zephyrmike
zephyrmike / fluent-forms.css
Last active June 30, 2024 16:44
CSS classes for Fluent Forms
/* To target individual forms replace .fluentform .frm-fluent-form with form.fluent_form_# */
/* label style */
.fluentform .frm-fluent-form .ff-el-input--label {
font-size: 1rem;
color: var(--contrast);
font-weight: 700;
}
/* field style */
@zephyrmike
zephyrmike / query-block.css
Created January 6, 2022 17:09
CSS to style the WordPress Query Loop Block
/* query loop featured image */
.wp-block-post-featured-image img {
margin-bottom: 10px;
border-radius: 4px;
}
/* query loop h2 title */
h2.wp-block-post-title {
margin-bottom: 5px;
}
@zephyrmike
zephyrmike / ng-form.css
Last active March 20, 2022 16:05
Newsletter Glue Form Styling
/* remove margin below form */
.ngl-form {
margin-bottom: 0px !important;
}
/* ng container spacing in and out */
.wp-block-newsletterglue-callout {
padding-top: 40px !important;
margin: 40px auto;
}
@zephyrmike
zephyrmike / podia-button.css
Last active July 12, 2022 23:11
Styling a Podia embed button using the WP html block and css
/*
1. get the link embed code for your Podia product
2. add class="button" to the Podia embed code
3. paste the code inside a WordPress html block
4. edit the button css below to style your button
*/
.button {
background-color: #111111;
color: #ffffff;
@zephyrmike
zephyrmike / gp-gb-buttons
Last active January 19, 2024 10:38
Button classes for GeneratePress and GenerateBlocks
/* Use the classes below to style all the GeneratePress and GenerateBlocks buttons */
/* GeneratePress button */
.button,
.button:visited,
.button:focus {
/* add styles here */
}