This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Bootstrap 5 version of karrikas WP embed override. | |
add_filter('embed_oembed_html', 'my_embed_oembed_html', 10, 4); | |
function my_embed_oembed_html($html, $url, $attr, $post_ID) { | |
$newHtml = '<div class="ratio ratio-16x9">%s</iframe></div>'; | |
return sprintf($newHtml, $html); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Set featured image | |
* Plugin URI: http://wpengineer.com/2460/set-wordpress-featured-image-automatically/ | |
* Description: Set featureed image automaticly on save post/page | |
* Version: 1.0.1 | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de | |
* License: GPLv3 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
&.wpcf7 { | |
margin: 0; | |
padding: 0; | |
} | |
&.wpcf7-response-output { | |
margin: 2em 0.5em 1em; | |
padding: 0.2em 1em; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You made a backup right? Ok.... | |
# I needed this because I had over 100k posts in a CPT and deleting was a pain. | |
# This doesn't take into account any categories or revisions, so keep that in mind. You can use a plugin to clean those up or edit this to your liking. | |
# The first select statement you can run to determine if you have the correct records you want to delete. | |
# Change 'custompost' to whatever your custom post type is called. | |
SELECT DISTINCT ID, post_title, post_type, post_status | |
FROM wp_posts a | |
LEFT JOIN wp_postmeta b ON ( a.ID = b.post_id ) | |
WHERE a.post_type = 'custompost' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN Hide Backend - Insert this before your default WP url rewrites | |
# Rules to hide the dashboard | |
RewriteRule ^/website-login/?$ /wp-login.php [QSA,L] | |
# END Hide Backend |