Advanced WordPress query using formula
This project received 37 bids from talented freelancers with an average bid price of $579 USD.Get free quotes for a project like this
Project Budget$250-$750 USD
I am building a custom WordPress website using the Isotope masonry jquery plugin. Posts will be displayed visually using their featured images.
I can set all of this up, but I need a programmer to write an advanced WP query to load the posts using a specific algorithm/formula.
The main query will pull posts from a custom post type (CPT) called "Employees."
We want to partially randomize the Employee posts so that more senior employees tend to show higher. There are four tiers of employees, and each employee post will be assigned a Tier Number (1 to 4, with 4 being senior level) via a custom field.
Each time the employee page is generated, each post from this CPT should be assigned a Random Number (1 to 5) which will be multiplied by its pre-defined Tier Number (1 to 4). Then, using the product of "Tier x Random," the posts should be displayed in descending order.
For example, a Tier 2 employee with a random 4 would equal "8". A Tier 4 employee with a random 3 would equal "12". Posts should then be assembled in descending order based on that final number. It will be different each time you view the page because the generated random numbers will be different.
Adding another level of complexity, posts from another CPT (let's call it "fillers") should also be pulled into this loop and be interspersed randomly, approximately 1 post from the Fillers CPT for every 6 posts from the Employees CPT. Perhaps you use a counter that says "after every 6th post, display a post from "Fillers"?"
I can provide you with access to a WordPress setup that has all the CPTs loaded in with sample posts and the relevant custom fields. I will also have the masonry script set up as well. I can give you FTP access as well. What I need you to do is write the queries to pull the posts in using the above algorithm/formula.
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online