Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am alexed93 on github.
  • I am glopieo (https://keybase.io/glopieo) on keybase.
  • I have a public key ASAWZ4JRqz7q2UKka0T2wWNUM6fLjhDnTgtPu8eTsZ3qlAo

To claim this, I am signing this object:

@Alexed93
Alexed93 / gist:b56ce48f5037f73fda772767a7e8c132
Created July 20, 2017 21:23
Delete repo folder in one command
be cap staging cache:repo:purge
curl -I URLHERE
@Alexed93
Alexed93 / gist:4f76e08aa590ba684c3c0d9e947986b8
Last active July 20, 2017 21:18
WP+ACF Loop through with count
<?php
// Define repeater field from database
$featured_sections = get_field('featured_section');
?>
<?php
// Checking if repeater has any values
@Alexed93
Alexed93 / gist:c1266842e09ef700170c8d1c52bbb4c1
Created May 9, 2017 14:33
Bin all attachments (i.e. just after cloning a DB and setting up the site locally, but before adding any new uploads)
wp post delete $(wp post list --post_type='attachment' --format=ids)
@Alexed93
Alexed93 / gist:994386a0cd6283bd573d9c1a022682ed
Created February 27, 2017 13:51
Re-ordering WP Admin menu items
// Re-order backend Admin
// -------------------------------------------------------------
function custom_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array(
'index.php', // Dashboard
'edit.php', // Posts
'edit.php?post_type=page', // Pages
'edit.php?post_type=team', // Team Members