Adding ?sub_confirmation=1 to the end of any YouTube link will auto-open the subscription popup.
// Parallax | |
.parallax { | |
@include breakpoint(small) { | |
background-size: cover; | |
background-position: top center; | |
} | |
@include breakpoint(medium) { | |
background-attachment: fixed; | |
} | |
} |
h2 { | |
overflow: hidden; | |
text-align: center; | |
&:before, &:after { | |
background-color: $color; //Color of the line | |
content: ""; | |
display: inline-block; | |
height: .2rem; //Size of the line | |
position: relative; | |
vertical-align: middle; |
# Force Redirect HTTP to HTTPS | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |
/** Redirect private pages/posts to login */ | |
require_once( 'library/private-redirect.php' ); |
/** TinyMCE Styles Changes **/ | |
require_once( 'library/tinymce-styles.php' ); |
<?php | |
/** | |
* Archive Slug to Title | |
* | |
* Gets `this` post's post type, then gets the archive slug of the post | |
* then outputs the slug, replacing `-` with ` ` and uppercasing every word | |
* | |
* @NOTE: This is not a perfect solution but will work for 90% of use cases. | |
* For more control, create an ACF `options` page of that post type with a | |
* text input. Then use this for the title. If doing this, it's also a |
<?php | |
add_filter( 'gform_form_post_get_meta', __NAMESPACE__ . '\\enforce_gravity_forms_anti_spam_honeypot' ); | |
/** | |
* Enforce anti-spam honeypot on all Gravity forms. | |
* | |
* @param array $form The current form to be filtered. | |
* | |
* @return array | |
*/ | |
function enforce_gravity_forms_anti_spam_honeypot( $form ): array { |
<?php | |
/** | |
* Add REST API to an existing custom post type | |
* Remember to add existing custom fields | |
*/ | |
function add_cpts_to_api( $args, $post_type ) { | |
if ( 'post_name' === $post_type ) { | |
$args['show_in_rest'] = true; | |
} |
This is important when adding custom image sizes. The FoundationPress theme add new sizes by default. What happens is when you add new images sizes they go at the end of the list, so it would be, "Thumbnail, Medium, Large, Full Size, Small, XLarge". This is confusing to the user and will auto select medium normally. The best order is to have the image sizes in order from smallest to largest, then full size, then the thumbnail.
The important piece is after the comment "Unset WP Default sizes so they can be reordered with new custom sizes". This removes them from the list of available image sizes. Then right after you re-add them in order as well as custom sizes.
FoundationPress theme you can edit to add the "unset" rules then add them into the $sizes array. More generically, you can add this to functions.php.