Osclass theme custom field show more times

If you have any osclass theme and want to display one or more times any custom field or more fields, then you need to follow this steps.

First step is to indentify the name for your custom field. Go to your control panel > Listings > Custom Fields:

Another way to indetify the name for any custom field: Go to your  PhpMyAdmin, then choose oc_t_meta_fields:

Now, when you know the field name, you need to add the code in your file: item.php.

This line need to be added where your custom fields should be displayed:
“<?php View::newInstance()->_erase(‘metafields’); ?>”

For example we have by default the code which show all custom fields:

<?php if( osc_count_item_meta() >= 1 ) { ?>
<div class=”meta_list”>
<?php View::newInstance()->_erase(‘metafields’); ?><?php while ( osc_has_item_meta() ) { ?>
<?php if(osc_item_meta_value()!=”) { ?>
<div class=”meta”>
<strong><?php echo osc_item_meta_name(); ?>:</strong> <?php echo osc_item_meta_value(); ?>
<?php } ?>
<?php } ?>
<?php } ?>

If you want to show only one field you need to add this code:

<?php View::newInstance()->_erase(‘metafields’);
$custom_field_content = array();
if( osc_count_item_meta() >= 1 ) {
while ( osc_has_item_meta() ) {
if(osc_item_meta_value() !=””) {
$custom_field_name_content[osc_item_meta_slug()] = osc_item_meta_name();
$custom_field_value_content[osc_item_meta_slug()] = osc_item_meta_value();
} ?>

<?php echo $custom_field_name_content[‘change_with_your_custom_field_name’] ;?>: <strong><?php echo $custom_field_value_content[‘change_with_your_custom_field_name’] ;?>


Best Osclass Themes, premium and free!

Hi, meet the best osclass themes, premium and free, choose your desired theme and download it now! In these days many of us want to build an classified website based on osclass script. It does not matter whether the site is focused on local visitors or around the world, it should look great, to be clean, responsive and load fast.

Nadejda – Premium Responsive Osclass Theme.

Nadejda is a special theme for osclass with a modern design. Your website will work on almost devices. 100% responsive design, all of functions of your website will be guaranteed on: desktops, laptops, ipads, iphones, android, and give visitors beautiful interface. Help visitors understand more about the site and classifieds, via sliders on home page. These sliders allows yout to show latest items sorted by categories. All these products are diplayed in slider with nice design and smooth effects. This theme is compatible with all osclass version and work with multi-languages. The theme becomes brighter with big banners/slider on home page, you can add up to 3 images. Font Awesome gives you scalable vector icons that can instantly be customized – size, color, drop shadow, and anything that can be done with the power os CSS.

Nadejda Demo Read More

OSClass Theme Free Standard Version For Classifieds Websites

See Demo: http://osclasspremium.themehelp.us/classtheme/

Note: How to install this theme whithout errors.
1. Download this theme on your local computer.
2. Upload archive on your: /oc-content/themes/ using any FTP client and unzip it.
3. Go to your admin area and activate your new theme.

Coming soon another theme…

This theme you can use on your websites for free.
You can not sell this theme.
You can make any changes on this theme.