Osclass country based listing for any pages

0

Osclass items/ads/listing can be shown  by  different types of criteria or any other specific terms. Sometimes we may need to show osclass country based listing for the theme development purpose.

Osclass country based listing for any pages

Here I am showing  the a way to display country based listing for any pages in Osclass. Generally, the Osclass cms  display listings from all of the countries. By default if you use the PHP code ( osc_count_latest_items() == 0) then it will return all of the listing from all of the countries. But there has a trick to show the listings from specific countries.

Osclass country based listing

Suppose you want to show the listing only from the United States. Then you showing write sCountry’ => ‘us’ inside of the listing query loop.

Example :

You have to replace

with the code

There “xxx” is the country code which could be found in your Osclass database table   oc_t_item_location under  oc_t_item_location colum.

If you want to download osclass click here

Get more osclass tutorials, tips and tricks here 

Share.

About Author

I have no more personal information to share with you but have enough experience to share with all. I am always funny