Advertisement:

Author Topic: {Solved}Regarding custom fields on bender theme  (Read 2161 times)

rahulk

  • Full Member
  • ***
  • Posts: 132
  • What we face is destiny, how we face is free will.
{Solved}Regarding custom fields on bender theme
« on: September 12, 2013, 09:12:31 am »
I am using osclass 3.2.1 and bender theme. I want to show custom fields on listings on homepage and search page just like it is shown on item detail page. Can some one help me?

Thanks!
« Last Edit: September 13, 2013, 09:34:02 am by rahulk »

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: Regarding custom fields on bender theme
« Reply #1 on: September 12, 2013, 10:00:04 am »
Hi,

you need to change the file functions.php in theme folder and find (around line 150) the line

 <p><?php echo osc_highlight( strip_tags( osc_item_description()) ,250) ; ?></p>

and change for

Code: [Select]
<p><?php echo osc_highlightstrip_tagsosc_item_description()) ,250) ; ?><?php if( osc_count_item_meta() >= ) { ?>
<?php while ( osc_has_item_meta() ) { ?>
<?php if(osc_item_meta_value()!='') { ?>
<?php echo "<div style='font-size:.8125em'><strong>".osc_item_meta_name(); ?>:</strong> <?php echo osc_item_meta_value(); ?></div>
<?php ?>
<?php ?>
<?php ?></p>

This should add the custom field to main and search pages.

Hope this work

rahulk

  • Full Member
  • ***
  • Posts: 132
  • What we face is destiny, how we face is free will.
Re: Regarding custom fields on bender theme
« Reply #2 on: September 12, 2013, 10:28:32 am »
Hi, cartagena68

Thanks for quick reply!

But I cannot find the line in functions.php in bender theme. I am using Osclass 3.2.1 and default Bender theme.

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: Regarding custom fields on bender theme
« Reply #3 on: September 12, 2013, 10:38:37 am »
Hi,
sorry i was doing it for bender black, i supposed was the same but now i realized that are different and i don't  know how to do it in bender. I can try but i need some time ( i'm not a programmer ). If i will find the way i will post it here.
Sorry again.

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: Regarding custom fields on bender theme
« Reply #4 on: September 12, 2013, 11:10:41 am »
Hi,
in bender theme you find the same line and make the same changes, but is in a different file.
the file is loop-single.php in theme folder.

Maybe you need to make the changes also in loop-single-premium.php

rahulk

  • Full Member
  • ***
  • Posts: 132
  • What we face is destiny, how we face is free will.
Re: Regarding custom fields on bender theme
« Reply #5 on: September 12, 2013, 11:32:25 am »
Hi, cartagena68

You are great! it worked.

Thank you so much!

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: Regarding custom fields on bender theme
« Reply #6 on: September 12, 2013, 08:02:36 pm »
Hi rahulk,
glad to help if i can.

If this worked for you mark the post title as [SOLVED]