Category callback box problem

Yes there is such possibility.

Just change your code to this:

$main_category_name = YOUR MAIN CATEGORY NAME;  // get the main category of this section (i.e nadchodzące)

foreach( ( get_the_category() ) as $category ) {
    if ( $category->cat_name != $main_category_name ) {
        $category_name = $category->cat_name;
        $category_url = get_category_link($category);
        $cat_com_url = get_comments_link();
    }

<span class="cb-category"><a href="https://wordpress.stackexchange.com/questions/106337/<?php echo $category_url; ?>"><?php echo $category_name; ?></a></span>

Just change YOUR MAIN CATEGORY NAME to your real category name.

EDIT: I did what you told me to do, asked my friend for some more help and finally it works! thank you very much Krzysiek, you have solved this problem for me and I am very grateful 🙂 Now it looks much better.

I am adding the code just to make things crystal clear:

     $main_category_name = $parent_cat_name; // get the main category of this section (i.e nadchodzące)

$faki = 0;
foreach( ( get_the_category() ) as $category ) {


    if ( $category->cat_name != $main_category_name ) {
    $category_name = $category->cat_name;
    $category_url = get_category_link($category);
    $cat_com_url = get_comments_link();
    }

    if($faki ==0)
    {
        $category_name = $category->cat_name;
        $category_url = get_category_link($category);
        $cat_com_url = get_comments_link();
    }
    $faki++;
}

Thanks again for your help!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)