Quantcast
Channel: code snippets – I'm not really a geek I just play one on the internet.
Browsing all 3 articles
Browse latest View live

Disable Post Revisions in WordPress

The Post Revisions feature in WordPress takes up database space that I’d rather not waste. So I found out how to disable the feature. Add this to wp-config.php: // disable post revisions...

View Article



Test for Password Protected Post/Page

if (is_singular() && post_password_required($post))

View Article

Exclude Specific Post Formats from Main Loop

function exclude_post_formats( $query ) { if ( $query->is_main_query() && $query->is_home() ) { $tax_query = array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms'...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images