Skip to content

Instantly share code, notes, and snippets.

View stebrech's full-sized avatar

Stefan Brechbühl stebrech

View GitHub Profile
@stebrech
stebrech / wp_auto_twitter_links.php
Last active January 3, 2016 22:19
Automatische Verlinkung von Twitter-Benutzernamen.
@stebrech
stebrech / Deaktiviere WP Galerie head styles
Created December 27, 2013 03:08
Styling von WordPress-Galerien über die functions.php ausschalten
add_filter( 'use_default_gallery_style', '__return_false' );
@stebrech
stebrech / excerpt_readmore.php
Last active December 26, 2015 17:19
Custom excerpt read more link
<?php function excerpt_readmore($more) {
return '... <a href="'. get_permalink($post->ID) . '" class="readmore">' . 'Read More' . '</a>';
}
add_filter('excerpt_more', 'excerpt_readmore'); ?>
@stebrech
stebrech / moving_wordpress
Created June 13, 2013 17:54
Moving WordPress: 1. Replacing WordPress’ base URL path. 2. Update the GUID that controls WordPress’ translating paths and post locations. 3. Update the URL paths in the content. 4. Update the URLs in the meta data of posts, such as attachments.
UPDATE wp_options SET option_value = replace(option_value, 'http://localhost:8888/wordpress', 'http://www.YOUR_SITE_URL.com') WHERE option_name = 'home' OR option_name = 'siteurl';
@stebrech
stebrech / change_login_logo.php
Created November 30, 2012 14:32
Ersetze das WordPress Logo auf der Login-Seite mit deinem eigenem Logo.
function custom_login_logo() {
echo
'<style type="text/css">
h1 a {
background-image:url('.get_site_url().'/wp-content/uploads/login.png) !important;
background-size: 100% auto !important;
margin-left: 8px !important;
width: 312px !important;
}
</style>';