How to install Composer on MacOS

There is some ways to install it. I will describe the way with Brew.

If you don’t have a brew, let’s do the followings…

It’s very easy to install brew. You have to run only your terminal and paste this code:

Step1 Install brew:

/usr/bin/ruby \
-e “$(curl -fsSL”

What does that code do here ?
1. Get script from
2. Do it by using ruby

Step2 Install Composer:

brew install composer

Step3 check the version:

composer –version

Ref Link:


The way to search through posts by ID in WordPress admin panel

Here we can do it ….

Please add the following code in your functions.php file.

add_action( 'parse_request', 'idsearch' );
function idsearch( $wp ) {
global $pagenow;

// If it's not the post listing return
if( 'edit.php' != $pagenow )

// If it's not a search return
if( !isset( $wp->query_vars['s'] ) )

// If it's a search but there's no prefix, return
if( '#' != substr( $wp->query_vars['s'], 0, 1 ) )

// Validate the numeric value
$id = absint( substr( $wp->query_vars['s'], 1 ) );
if( !$id )
return; // Return if no ID, absint returns 0 for invalid values

// If we reach here, all criteria is fulfilled, unset search and select by ID instead
unset( $wp->query_vars['s'] );
$wp->query_vars['p'] = $id;

All you then do is search using the regular search box using a #(hash) prefix infront of the numeric ID.


..would return the post with an ID of 123.