Đang Thực Hiện

Write PHP function to return JSON after WP_Query and re-order / total some data

In WordPress I have a custom post type. In each post of this custom post type is a custom field named "report" this custom field (post meta field) stores a JSON blob which is an array of objects (JSON)

An example of the JSON is below, this is stored in the post meta / custom field of the custom post type.

[{"entrances":"1","ga:date":"20080918","ga:landingPagePath":"/","ga:sourceMedium":"aol / organic","pageviews":"5","sessions":"1","totalValue":"0.0","transactionRevenue":"0.0","transactions":"0","transactionsPerSession":"0.0","uniquePurchases":"0"},{"entrances":"1","ga:date":"20080918","ga:landingPagePath":"/[url removed, login to view]","ga:sourceMedium":"aol / organic","pageviews":"7","sessions":"1","totalValue":"0.0","transactionRevenue":"0.0","transactions":"0","transactionsPerSession":"0.0","uniquePurchases":"0"}]

Note that one report for one day has multiple JSON objects with different pageview entries

Your job is to create a PHP function which uses WP_Query, to query all of the posts from the custom post type between two dates. So $query = new WP_Query('posts_per_page -1 etc...... To query dates you will use [url removed, login to view]

Now for each post which is returned. The PHP function will get all post meta reports. Then return total pageviews per day. And return JSON which is array of arrays, the first value is day, the second is total pageviews for that date

{

"total_pageviews": [

[20080918, 10],

[20080919, 52]

]

}

I have a few more similar projects to format JSON data I hope to have this completed very soon thank you

I will provide sample data for WP_Query

Kỹ năng: PHP, WordPress

Xem thêm: Google Drive direct link PHP function return direct link, write a essay about you want to start a new life and forget about your past, fatal error can t use function return value in write context in wp content themes shopera content php on line 104, php api return json, simple web service php return json, write php query smarty, write source code date function return string, php function return 403 error, write recursive function writes digits positive decimal integer reverse order , write complete function return larger integers , return json mysql query php, return html link php function, write complete function will return larger integers, write search function website php, php function order, write javascript function mysql query

Về Bên Thuê:
( 10 nhận xét ) Mount Sinai, United States

Mã Dự Án: #14799323

Đã trao cho:

ravichedwal

hello sir i am very good php developer i have dene lots of work in rest and soap api thanks Relevant Skills and Experience hello sir i am very good php developer i have dene lots of work in rest and soap api tha Thêm

$20 USD trong 1 ngày
(63 Đánh Giá)
6.0

7 freelancer đang chào giá trung bình $24 cho công việc này

maverik902

I have experience in making these kind of websites and has many satisfied clients. Will provide example websites on request. [url removed, login to view] Relevant Skills and Experience HTML, CSS, WORDPRESS AND PHP Proposed M Thêm

$25 USD trong 1 ngày
(85 Đánh Giá)
6.1
liangjongai

Hi, sir I have a great skill in wordpress. I'm sure I can complete your project. My price and period is negotiable. We can discuss the details via chat. Thanks. Relevant Skills and Experience I have been developing f Thêm

$25 USD trong 1 ngày
(80 Đánh Giá)
5.7
abbalove

Hey, can you give me sample data in database to make it ? Rocky .

$35 USD trong 1 ngày
(43 Đánh Giá)
5.1
$15 USD trong 1 ngày
(17 Đánh Giá)
3.8
$25 USD trong 1 ngày
(1 Đánh Giá)
0.0
deep749mama

I’ve carefully gone through your job posting. I ’m an expert HTML/CSS, wordpress, core php , laravel, codeigniter developer with more than 4 years experiences Relevant Skills and Experience I ’m an expert HTML/CSS, wo Thêm

$25 USD trong 1 ngày
(1 Đánh Giá)
0.0