WordPress (admin) posts search GET request filter

function getPostsByCategorySlug(slug) { return site.categories().slug( slug ) .then(function( matchingCats ) { // matchingCats will be an array of the one post that matches // the provided slug if ( ! matchingCats.length ) { throw new Error( `No category found for slug “${slug}”` ); } var catID = matchingCats[ 0 ].id; return site.posts().categories(catID); }); } getPostsByCategorySlug( … Read more

Linking table cells to network folders

If it is a mapped drive under windows: <a href=”https://wordpress.stackexchange.com/questions/249806/file:///networkdrive/folder1/folder2/folder3/DB – Databases”>DB – Databases</a> If it is not a mapped dirve: <a href=”https://wordpress.stackexchange.com/questions/249806/file://///server/folder1/folder2/folder3/DB – Databases”>DB – Databases</a> You should use the 3 /// for the file protocol and 2 // for the network address. More and more browsers seem to block links with the file:// … Read more

Add menu option to “New Post” menu in admin bar

Use new-content : function make_parent_node($wp_admin_bar) { $args = array( ‘id’ => ‘test1234’, // id of the existing child node (New > Post) ‘title’ => ‘test’, // alter the title of existing node ‘parent’ => ‘new-content’, // set parent to false to make it a top level (parent) node ‘href’ => admin_url(‘admin.php?page=enter_timesheet’) ); $wp_admin_bar->add_node($args); } it … Read more