How can i show specific Category List?

By this code ,it shows all the category.but i want to show specific some category(like-Officer,Training) Thanks in Advance <?php // change category to your custom page slug $categories = get_categories(); foreach ($categories as $category) { $option .= ‘<option value=”‘.get_option(‘home’).’/category/’.$category->slug.'”>’; $option .= $category->cat_name; $option .= ‘ (‘.$category->category_count.’)’; $option .= ‘</option>’; } echo $option; ?> </select>

Getting error message as The most recent request was denied because it had an invalid security token. Please refresh the page and try again

In my list view I have added token in my form using <?php echo JHtml::_( ‘form.token’ ); ?> Then I have redirected from the list view to a controller’s task like http://some/joomla/site/administrator/index2.php?option=com_users&task=edit&id=1 In the controller I checked for the token using Session::checkToken() or jexit(Text::_(‘JINVALID_TOKEN’)); Now when I login through backend as Super User select any…

D8 Database Deadlock detected

We’re getting a few deadlock conditions – most connected with the cache. There are quite a few answers to this issue but not so much for D8 (which has very different caching mechanism). Is there any way to resolve/mitigate? Drupal\Core\Entity\EntityStorageException: SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected DETAIL: Process 9131 waits for ShareRowExclusiveLock on relation…

Rewrite rules for custom taxonomies

I got car custom post type. And got custom taxonomies (model, year, color) for car post_type. Car archive link looks like this: https://example.com/car/ And i am filtering this archive page with $_GET parameters. It looks like this: https://exapmle.com/car/?model=audi&year=2000&color=white/ But i want to make clean url with add_rewrite_rule like this: https://example.com/car/audi/2000/white/ Is it possible? How can…