Skip to content

Instantly share code, notes, and snippets.

👾
Invading

Kevin Pliester pixelbart

👾
Invading
Block or report user

Report or block pixelbart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pixelbart
pixelbart / functions.php
Created Aug 30, 2019
Change the title tag of WordPress
View functions.php
<?php
/**
* Custom title tag in WordPress
*
* @author Kevin Pliester
*/
/**
* Set custom title
*
@pixelbart
pixelbart / contact-form.php
Last active Jul 17, 2019
Einfaches WordPress Kontaktformular
View contact-form.php
<?php
/**
* @author Kevin Pliester <me@pixelbart.de>
*/
/**
* Der E-Mail-Empfänger.
*/
$email_receivers = [ 'meine@email.de' ];
@pixelbart
pixelbart / functions.php
Last active Jul 15, 2019
Related posts at the last position in the content.
View functions.php
<?php
/**
* Add related posts at the last position in the content.
* URL to Plugin: https://de.wordpress.org/plugins/wordpress-23-related-posts-plugin/
*
* @param string $content post content.
*
* @return string
*/
function my_related_posts( $content ) {
@pixelbart
pixelbart / class-custom-status.php
Last active May 7, 2019
Class for custom post status in WordPress
View class-custom-status.php
<?php
/**
* Class for custom post statuses
*/
class Custom_Status
{
protected $status, $labels, $post_type;
/**
* Set variables
@pixelbart
pixelbart / uk-lightbox.js
Created Jan 21, 2019
Uikit lightbox on wordpress block galleries
View uk-lightbox.js
(function($) {
if( $('.wp-block-gallery, .wp-block-image').length ) {
$(ukLightboxGallery);
}
function ukLightboxGallery() {
$('.wp-block-gallery, .wp-block-image').attr('data-uk-lightbox', true);
$('figure').each(function() {
var src = $(this).find('img').attr('src');
@pixelbart
pixelbart / .htaccess
Created May 7, 2018
Force SSL .htaccess
View .htaccess
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@pixelbart
pixelbart / magic.txt
Created Apr 20, 2018
Remove Jetpack Website Stats
View magic.txt
your-domain.de/wp-admin/admin.php?page=jetpack_modules
@pixelbart
pixelbart / after-load.js
Last active Apr 17, 2018
load scripts after ajax load
View after-load.js
var data = {};
data['test'] = 'test';
var response = $.ajax({
url : ajax_url,
data : data
});
response.always(function() {
$.getScript('file.js');
@pixelbart
pixelbart / replace.sql
Last active Aug 19, 2017
replace http to https (mysql) wordpress
View replace.sql
UPDATE `wp_posts` SET post_content = REPLACE(post_content, 'https://', 'http://') WHERE post_content LIKE '%http://%';
UPDATE `wp_postmeta` SET `meta_value` = REPLACE(meta_value, 'https://', 'http://') WHERE meta_value LIKE '%http://%';
UPDATE `wp_options` SET `option_value` = REPLACE(option_value, 'https://', 'http://') WHERE option_value LIKE '%http://%';
@pixelbart
pixelbart / simple-color-picker.html
Created Apr 19, 2017
A simple color picker for/with html and jquery
View simple-color-picker.html
<label class="kevin-color">
<input type="text" name="kevin_color" value="" />
<input type="color" name="kevin_color" value="" />
</label>
<script>
jQuery('.kevin-color input[type="color"]').on( 'change', function() {
var ValColor = jQuery(this).val();
jQuery('.kevin-color').find('input[type="text"]').val(ValColor);
});
You can’t perform that action at this time.