Support Forums - Classified Ads Script Osclass
Osclass theme support => Beta Osclass Theme => Topic started by: Andrey on February 04, 2020, 10:47:39 AM
-
Hello! Like in Beta Theme on the announcement page, display “Category” as a link. Like in Violet Theme
Violet
(https://do-mos.ru/Violet.JPG)
Beta
(https://do-mos.ru/Beta.JPG)
-
@Olime
https://docs.osclasspoint.com/hitems-php
Probably you would go with code:
<a href="<?php echo osc_item_category_url(); ?>"><?php echo osc_item_category()['s_name']; ?></a>
if osc_item_category does not return anything, try osc_item_category_name
if osc_item_category_url does not exists, try osc_search_url('page' => 'search', 'category' => osc_item_category_id())
-
The page does not load with this code. White background. In the original view on the code, the page ends.
In Violet theme, your code works. No Beta
-
@Olime
Read whole message. Check your error log.
-
[04-Feb-2020 18:15:56 Europe/Moscow] PHP Fatal error: Call to undefined function osc_item_category_url() in /home/p/www/public_html/oc-content/themes/beta/item.php on line 13
Category without a link is added there
-
So you see function does not exists, you have alternatives in my post, you must be more proactive when doing customization in your site and test all possibilities.
-
I tried everything, even this
<a href="<?php echo bet_item_category_url(osc_item_category_id()) ; ?>"></a>
-
osc_search_url('page' => 'search', 'category' => osc_item_category_id())
-
Does not work
[04-Feb-2020 21:21:27 Europe/Moscow] PHP Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /home/p/www/public_html/oc-content/themes/beta/item.php on line 31
-
@Olime
osc_search_url(array('page' => 'search', 'category' => osc_item_category_id()))
-
Thank you so much for the quick help. Everything works fine, even the city finds it through this code. Why there used to be an error, that I wrote the code wrong.
Thank you :)
-
Super