Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Creating paid for 'featured' options on a directory planning website

Hi,

I'm basically creating a directory planning website. I wanted to build the using a MySQL back-end that can be queried to produce a list of options on a results page that match the planning criteria.

I then want to be able to add an option to purchase a position in a featured section at the top of the list of results and on the homepage. Similar to the paid options you can choose to promote your listings on gumtree i.e Homepage spotlight, bump up and featured listing.

I was wondering if anyone could help with the best way to go about this?

I know little about digital purchases. I have completed the tutorials on treehouse but they focus more around tangible purchases.

I want merchants to be able to purchase space on my website and for the process to be automated.

Any help with this issue would be much appreciated. Please let me know if I haven't been clear with what I'm trying to achieve and I will try to give further clarity.

Kind Regards

Adam

15 Answers

kyle rees
kyle rees
1,480 Points

asuming what your doing is similar to google listings where paid people get higher

you could assign each listing a numeric value and sort by that value when displaying them

so 5 samples would be

name rank list1 1 list2 4 list3 4 list5 2

then if you sort accending by rank when displaying them theyd display

list1 list5 list2 list3

or something similar anyway different listings can share the same rank number it just means they wont get any higher in the listing than anything else of the same rank

kyle rees
kyle rees
1,480 Points

or if you just want to place certain listings in a featured section have a field for featured then just earch for featured only or use the previous method and sort decending so featured=1 goes higher than featured=0 the implimentation is a bit jank in my examples but all the same whatever you do it will involve having some sort of field in your tables that are queried

That's a good idea with regards to tagging and displaying the results. Do you have any idea how to make the process automated with regards to purchases, so that as soon as the featured element is paid for it starts to appear that way in the results.

Thank you for your previous two responses by the way :)

On a side note I have found this feature in a few Wordpress themes and although I wanted to produce the website myself I am now toying with the idea of using a theme :s

Although unless I can combine a number of wordpress themes it will only solve this problem and I'll run into more down the line, which I then don't think I'll be able to resolve because I'll be stuck within the wordpress framework.

kyle rees
kyle rees
1,480 Points

once again im just gonna assume your making something akin to google

im also going to asume that once theyve made a listing in your directory that they have some way to view there listings in a member area if so simple have a make featured or buy featured space button beside each listing carry the id of that listing through the payment area and if payment is successfull then have php update the listing to be featured so theyd make a regular listing first then make it paid afterwards

I want the entries to already exist like google's search results would but if the owner of the listing wanted the option to appear high or featured they would be able to register and pay for the right to do so.

kyle rees
kyle rees
1,480 Points

i think your biggest issue in using word press will be making the plugin for it to do what you require word press does have functionality to be able to run some php applications within a page but still your probably asking allot of what was only supposed to be a blogging platform when it was created its since grown to be a full site solution but once again your far exceeding what it was intended for

best advice i can give is to pull your site back to the planning stage forget about looks forget about code start out with mapping out features and functionality how each thing will be done how it should function user wise then move into breaking those down into how you can do it with either php or exsiting packages like wordpress then take it into development

also if you find its too much for you to handle just carry on plan it all out and shelf it untill you are more prepared for it then come back dont just abandon it all together

kyle rees
kyle rees
1,480 Points

with regards to your previous post then definatley go with adding in the pay for featured button and pass the listing id or whatever unique key you have through the payment system then either apply a rank number or a featured flag to the listing at the end id probably go with the featured option cause that then gives you the ability to sort by relevance rather than who has the most cash to splash if you remember early google that was a common complaint that the top 7 listings on google were never relevant and were always just people that had more money

kyle rees
kyle rees
1,480 Points

if you need any more specific help message me and well talk on skype or something in more detail

Thanks for the advice.

I know all the features I want for the time being and I had planned it out then as I started looking at building a database a friend threw a spanner into the works saying just build it on wordpress. I found a few themes that have the features that I want:

http://demos.appthemes.com/?theme=vantage http://templatic.com/demos/?theme=nightlife http://templatic.com/demos/?theme=geoplaces4 http://templatic.com/demos/?theme=dailydeal http://templatic.com/demos/?theme=classifieds http://directorypress.premiumpresslimited.com/

and further down the line:

http://templatic.com/demos/?theme=dailydeal

The issue I have is finding a theme that will enable me to have the complete functionality that I'm looking for. A couple would solve the search term issue of featured results but moving forward I plan to growth the site and add additional functionality. Namely bookings, daily deals.

It is frustrating knowing that a combination of the themes that I have found would be a good solution

kyle rees
kyle rees
1,480 Points

hmm i stand corected wordpress can handle what your after what a clever little platform

have you considered making your own theme that would give you a bit more freedom

as for functionality it seems as if plugins already exist for what your after

I know very little about creating a custom theme, as I've mainly been focusing on general development. I think a possible solution would be to quickly put together a functioning Wordpress site to start to build up traffic and users whilst allowing time to build a fully functioning website away from the Wordpress platform

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

I hope I'm not missing too much jumping in here, but one kinda sneaky, but simple way of doing this would be to use a paid members plugin. A custom would register and you could manually assign them as authors to certain posts or entries. Then in your premium listings query you can say search for anything not by main editor. This would require some manual work, though.

Another approach would be to use WooCommerce and have all your entries as products. Then someone would say they want to promote one of those listings, pay a fixed or subscription price and then you could just query any listings that have been purchased to display at the top of the results. This would require a little learning with WooCommerce, but would be automated.

kyle rees
kyle rees
1,480 Points

id go with Zac Gordon he knows a little more on the subject than i do also i think custom coding everything would be a huge task when you have to start making search algorithms and stuff if there a premade soloution id go for it

I think I may try and manipulate Templatic's Geoplaces 4 theme. I believe they probably use a similar way to what Zac Gordon is suggesting, as I think they incorporate woocommerce.

If anyone has come across themes similar to this one that they can suggest I would really appreciate it.