Skip to content

Instantly share code, notes, and snippets.

View tribulant's full-sized avatar

Tribulant tribulant

View GitHub Profile
@tribulant
tribulant / functions.php
Last active January 9, 2023 20:50
WordPress upload_mimes filter hook example
// Add this to the functions.php file of your WordPress theme
// It filters the mime types using the upload_mimes filter hook
// Add as many keys/values to the $mimes Array as needed
function my_custom_upload_mimes($mimes = array()) {
// Add a key and value for the CSV file type
$mimes['csv'] = "text/csv";
return $mimes;
@tribulant
tribulant / style.css
Created October 21, 2016 11:45
Override Bootstrap Styles
/*
Put this CSS in a file that loads after the bootstrap.css
Eg. Inside wp-checkout/views/bootstrap/style.css
Start each Bootstrap class you want to override with .checkout ...
This example will remove the rounded corners from the button.
It will make the button pink with black text.
And on hover, active or focus the button will be red with white text
*/
@tribulant
tribulant / newsletters_posts
Last active March 18, 2022 04:39
Newsletters Multiple Posts
[newsletters_posts numberposts=10 orderby=post_date showdate=Y order=DESC category=0 language=en post_type=movies,products eftype=excerpt hidethumbnail="Y"]
@tribulant
tribulant / newsletters_post
Last active March 18, 2022 04:39
Newsletters Single Post
[newsletters_post post_id=15 showdate=Y language=en eftype=excerpt hidethumbnail="Y"]
@tribulant
tribulant / gist:ea6bd43800f48f91453b
Last active November 17, 2019 12:47
Disable WordPress Cron Job
// Place the line of code below in your wp-config.php file
// Defining the constant as true will tell WordPress to stop executing its cron job
define('DISABLE_WP_CRON', true);
@tribulant
tribulant / wp-config.php
Created January 20, 2017 11:02
WordPress Allow Unfiltered Uploads for wp-config.php
define('ALLOW_UNFILTERED_UPLOADS', true);
.modal-backdrop {
display: none;
}
[newsletters_meta key="_regular_price"]
@tribulant
tribulant / gist:4c3901a591a526362194dbb563294d8e
Created November 20, 2018 22:08
Products in Newsletters
[newsletters_posts language="en" showdate="N" eftype="excerpt" orderby="post_date" order="ASC" thumbnail_size="thumbnail" thumbnail_align="left" thumbnail_hspace="15" category="" post_type="product"]
@tribulant
tribulant / auto-iframe-height.html
Created November 13, 2018 10:21
Auto iFrame Height
<!-- Auto iFrame Height Instructions: https://www.lost-in-code.com/programming/javascript/javascript-auto-iframe-height/ -->
<iframe class="autoHeight" id="myframe" name="myframe" src="http://example.com/iframe.php" height="240" width="320" frameborder="0" scrolling="auto"></iframe>