Skip to content

Instantly share code, notes, and snippets.

View amElnagdy's full-sized avatar

Ahmed Mohammed Nagdy amElnagdy

View GitHub Profile
@amElnagdy
amElnagdy / secure-wp-config.php
Last active July 27, 2016 19:39
Secure your wp-config.php
// Add to your .htaccess file
<Files wp-config.php>
order allow,deny
deny from all
</Files>
@amElnagdy
amElnagdy / gist:6e8a5902ae3ecc36ab36ae04ffde4876
Created July 18, 2016 17:06
A simple fix for jQuery is not defined in WordPress
//source: https://wpcolt.com/jquery-not-defined-possible-causes-fix-wordpress/
define('CONCATENATE_SCRIPTS', false);
<span class="updated"> '.$updated_time.'</span>
$updated_time = get_the_modified_time('F jS, Y');
<span class="date updated published"><?php the_time(); ?></span>
<span class="date updated published"><?php the_time( get_option('date_format') ); ?></span>
<h1 class="entry-title">The title</h1>
<span class="vcard author"><span class="fn"><?php the_author(); ?></span></span>
// Source: https://wpcolt.com/fix-hentry-errors-wordpress/
add_filter( 'post_class', 'remove_hentry' );
function remove_hentry( $class ) {
$class = array_diff( $class, array( 'hentry' ) );
return $class;
}