Skip to content

Instantly share code, notes, and snippets.

@swest
swest / index.html
Created January 8, 2019 12:31
Quote with top/bottom border
<div class="blockquote-wrapper">
<div class="blockquote">
<h1>
Start before you are ready
</h1>
<h4>&mdash;Steven Pressfield</h4>
</div>
</div>
@swest
swest / yoast-disable-automatic-redirects.php
Created July 13, 2018 11:34
The Yoast SEO Premium's redirects manager includes automatic redirect creation and redirect request notifications. In rare cases, you may prefer to turn off some of these features.
<?php
/*
* from https://kb.yoast.com/kb/how-to-disable-automatic-redirects/
*
* Yoast SEO Disable Automatic Redirects for
* Posts And Pages
* Credit: Yoast Development Team
* Last Tested: May 09 2017 using Yoast SEO Premium 4.7.1 on WordPress 4.7.4
*/
add_filter('wpseo_premium_post_redirect_slug_change', '__return_true' );
<?php
// Change ‘Enter Title Here’ Text For Custom Post Type
// http://wp-snippets.com/change-enter-title-here-text-for-custom-post-type/
function change_default_title( $title ){
$screen = get_current_screen();
if ( '_your_custom_post_type_' == $screen->post_type ) {
$title = 'The new title';
}
@swest
swest / SassMeister-input-HTML.markdown
Created March 22, 2014 21:43
Generated by SassMeister.com.

Heading


  • list
    • indent 1
    • indent 2

new line

  • updated this plugin from v1.1.1 to 1.1.2
    • commentary
  • more commentary
@swest
swest / SassMeister-input.sass
Created March 22, 2014 17:46
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// Bootstrap Sass (v3.1.1.0)
// ----
@import "bootstrap"
@swest
swest / functions.php
Last active May 23, 2016 11:28
Custom Login & Shortcodes: add custom login stylesheet, change logo link and link URL. Snippet for functions.php, use with style-login.css
<?php
/* Shortcodes in Widget text & titles */
add_filter( 'widget_text', 'shortcode_unautop');
add_filter( 'widget_text', 'do_shortcode');
add_filter( 'widget_title', 'shortcode_unautop');
add_filter( 'widget_title', 'do_shortcode');
/* Additional Shortcodes */
add_shortcode('url','url_shortcode');
@swest
swest / style-login.css
Last active May 23, 2016 11:38
Custom style for login with button color overrides
body.login div#login h1 a {
background-image: url("/img/login-logo.png");
background-size: 380px 55px;
background-position: center top;
background-repeat: no-repeat;
margin: 0 0 -20px -20px;
width: 380px;
text-indent: -9999px;
overflow: hidden;