Skip to content

Instantly share code, notes, and snippets.

View seoagentur-hamburg's full-sized avatar

Andreas Hecht seoagentur-hamburg

View GitHub Profile
<?php
// Ab hier kopieren
// Füge Deinen Code genau zwischen <script> und </script> ein. Er sollte im Anschluss wie folgt aussehen:
function google_custom_search_tb( $atts ) {
return "
<div class=\"searchresultscontainer gcs\">
<h2>Deine Suchergebnisse für: <mark>".htmlentities($_GET['q'])."</mark></h2>
<script>
(function() {
<?php
// Ab hier kopieren
// Ersetzt den WordPress-Feed mit der Feedburner Adresse
function drweb_custom_rss_feed( $output, $feed ) {
if ( strpos( $output, 'comments' ) )
return $output;
/* Link mit deinem persönlichen Feed-Link ersetzen */
return esc_url( 'http://feeds.feedburner.com/drwebmagazin' ); }
<?php
// Ab hier kopieren
function ah_analytics_code() {
?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://techbrain.de/analytics.js','ga');
<?php echo dirname(__FILE__); ?>
<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>";
?>
delete from wp_options where option_name = ‘class_generic_support’;
delete from wp_options where option_name = ‘widget_generic_support’;
delete from wp_options where option_name = ‘fwp’;
delete from wp_options where option_name = ‘wp_check_hash’;
delete from wp_options where option_name = ‘ftp_credentials’;
delete from wp_options where option_name = ‘rss_7988287cd8f4f531c6b94fbdbc4e1caf’;
delete from wp_options where option_name = ‘rss_d77ee8bfba87fa91cd91469a5ba5abea’;
delete from wp_options where option_name = ‚rss_552afe0001e673901a9f2caebdd3141d’;
wp-options -> class_generic_support
wp-options -> widget_generic_support
wp-options -> wp_check_hash
wp-options -> rss_7988287cd8f4f531c6b94fbdbc4e1caf
wp-options -> rss_d77ee8bfba87fa91cd91469a5ba5abea
wp-options -> rss_552afe0001e673901a9f2caebdd3141d
@seoagentur-hamburg
seoagentur-hamburg / shortcode.php
Created July 24, 2016 17:56
Die Shortcodes für die Website-Screenshots
/* Der Standard-Shortcode */
[screen url="https://techbrain.de" alt="Techbrain"]
/* Shortcode mit Größenanpassung */
[screen url="https://techbrain.de" alt="Techbrain" w="1000" h="700"]
@seoagentur-hamburg
seoagentur-hamburg / wp-screen.php
Created July 24, 2016 17:52
WordPress Website Screenshots erstellen.
<?php
// Ab hier kopieren
/**
* Automatische Website Screenshots mit WordPress erstellen
*
* Nutzung: [screen url="https://techbrain.de" alt="Techbrain"]
* Größenanpassung des Screenshots: füge w="Breite" und h="Höhe" hinzu, also w="1000" h="600"
*/
function tb_screenshots($atts, $content = NULL) {
@seoagentur-hamburg
seoagentur-hamburg / temp.php
Last active July 15, 2016 16:54
Die funktionierende Lösung für den »Forbidden You don’t have permission to access /wp-admin/install.php on this server« Fehler bei der Installation von WordPress. Diese Datei in wp-admin hochladen und anstatt der »install.php« aufrufen.
<?php
/**
* WordPress Installer
*
* @package WordPress
* @subpackage Administration
*/
// Sanity check.
if ( false ) {
@seoagentur-hamburg
seoagentur-hamburg / jetpack.php
Created April 26, 2016 15:18
Alle Jetpack CSS-Dateien am Laden hindern
<?php
/* =============================================================================
1 - Disable all Jetpack CSS
============================================================================= */
// First, make sure Jetpack doesn't concatenate all its CSS
add_filter( 'jetpack_implode_frontend_css', '__return_false' );
// Then, remove each CSS file, one at a time