*

MB Themes

Re: Don't show the message submission form for a category
« Reply #15 on: June 08, 2023, 09:41:05 AM »
@kriskoyk
Effor to understand how if-else statement work?
Code is correct, you just place it wrongly or has wrong category id and this is just big waste of time discussing if(1=2) {} works and if(1=1) {} does nto work....
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 303 posts
Re: Don't show the message submission form for a category
« Reply #16 on: June 08, 2023, 01:10:11 PM »
This is where I put the code. Where am I doing wrong?


<?php if(osc_item_category_id()!=231) { ?>
<a href="<?php echo bet_fancy_url('contact'); ?>" class="open-form contact btn mbBg" data-type="contact"><i class="fa fa-envelope-o"></i> <?php _e('Apply and send CV', 'beta'); ?></a>
<?php } ?>

This is where I put the code. Where am I wrong?
I checked the id, it's definitely 231
« Last Edit: June 08, 2023, 04:30:44 PM by kriskoyk »

*

kriskoyk

  • *****
  • 303 posts
Re: Don't show the message submission form for a category
« Reply #17 on: June 11, 2023, 08:40:34 PM »
A clarification: The ID 231 refers to the main category in which there are many subcategories.

*

kriskoyk

  • *****
  • 303 posts
Re: Don't show the message submission form for a category
« Reply #18 on: June 12, 2023, 01:19:18 AM »
Problem solved. I put the id of the subcategory that appears in ITEM and not that of the main category and it works! Thanks for your help and patience.

*

MB Themes

Re: Don't show the message submission form for a category
« Reply #19 on: June 12, 2023, 06:10:57 PM »
Means 231 was not item category.
Np.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots