Skip to content

Instantly share code, notes, and snippets.

@Auke1810
Auke1810 / wpa-clean-header.php
Last active May 9, 2024 14:14
create a clean wordpress header and remove unnecessary clutter.
<?php
/*
Plugin Name: wordpress assist clean header
Plugin URI: http://www.wordpressassist.nl/
Description: Remove shortlink hook
Version: 1.0
Author: AukeJomm
Author URI: http://www.aukejongbloed.nl
*/
@pablolobos
pablolobos / javascript_equal-height.js
Created March 28, 2014 19:29
javascript_equal-height.js
/* Equal height columns */
equalheight = function(container){
var currentTallest = 0,
currentRowStart = 0,
rowDivs = new Array(),
$el,
topPosition = 0;
$(container).each(function() {
@TimBHowe
TimBHowe / function.php
Last active April 28, 2022 21:24
WordPress Redirect any pages that are in draft/trash for non login users to the home page
<?php
//redirect any draft/trashed posts
add_action('wp', 'trash_redirect');
function trash_redirect(){
if ( !current_user_can( 'edit_pages' ) ) {
if (is_404()){
global $wp_query, $wpdb;
$page_id = $wpdb->get_var( $wp_query->request );
$post_status = get_post_status( $page_id );
if($post_status == 'trash' || $post_status == 'draft'){