Posts

Showing posts from January, 2017

Arrange posts by "order" attribute in WordPress

It's just simple as this function: function my_get_posts( $query ) {     if ( is_home() && false == $query->query_vars['suppress_filters'] )                 $query->set('orderby', 'menu_order');                 $query->set('order', 'ASC');      return $query; } Basically, you need to order the posts by menu_order attribute.

Auto merge data from multiple sheets in a google spreadsheet

Image
Ok, so I heard that you want to merge multiple sheets (let's say 2) in a google spreadsheet? That's easy (after hours of trying :"D) Assuming you have 2 sheets as following: Sheet1 Sheet2: In the merged list or master list you need these information: First Name, Last Name, Company, Job Title, Email Address 1. First thing you need to do is to find out a field to use as merge key . It's Email Address in this case. You also should be noticed that there should be no duplicate email addresses. So in order to get all the unique email addresses from 2 sheets, you need to use UNIQUE. But UNIQUE will also give you a blank row (ending row), so FILTER will do the job: =FILTER(UNIQUE({Sheet1!H2:H;Sheet2!E2:E}),NOT(ISBLANK(unique({Sheet1!H2:H;Sheet2!E2:E})))) Notes: Look at how I refer to another sheet (Sheet!H2:H...) You only enter the formula in cell E2 of the Master list, all the email addresses will be filled in other rows automatically. 2. Then ...