Skip to content

Instantly share code, notes, and snippets.

View SteaveRayvon's full-sized avatar

SteaveRayvon SteaveRayvon

View GitHub Profile
@polevaultweb
polevaultweb / pvw_logging.php
Created September 25, 2020 09:59
WordPress mu-plugin for logging stacktraces in WordPress code
<?php
// Add this file to the wp-content/mu-plugins/ directory.
// It may need to be created if it doesn't exist
/**
* These constants must be set in wp-config.php
*
* define('WP_DEBUG', true);
* define('WP_DEBUG_LOG', true);
@netgfx
netgfx / Simple Ajax Login Form.php
Created May 11, 2018 17:20 — forked from cristianstan/Simple Ajax Login Form.php
Wordpress: Simple Ajax Login Form
<?php
//Simple Ajax Login Form
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/
//html
<form id="login" action="login" method="post">
<h1>Site Login</h1>
<p class="status"></p>
<label for="username">Username</label>
<input id="username" type="text" name="username">
<?php
/*
This script will allow you to send a custom email from anywhere within wordpress
but using the woocommerce template so that your emails look the same.
Created by craig@123marbella.com on 27th of July 2017
Put the script below into a function or anywhere you want to send a custom email
*/
@mattclements
mattclements / function.php
Last active April 16, 2024 17:04
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@ediamin
ediamin / bootstrap-pagination.php
Created July 5, 2015 21:10
Bootstrap Pagination for WordPress
/*
* custom pagination with bootstrap .pagination class
* source: http://www.ordinarycoder.com/paginate_links-class-ul-li-bootstrap/
*/
function bootstrap_pagination( $echo = true ) {
global $wp_query;
$big = 999999999; // need an unlikely integer
$pages = paginate_links( array(