WordPress.org

Make WordPress Core

Ticket #37655: 37655.diff

File 37655.diff, 568 bytes (added by withgjr, 5 years ago)
  • src/wp-includes/template.php

    diff --git src/wp-includes/template.php src/wp-includes/template.php
    index 380bb47..14e7eba 100644
    function get_category_template() { 
    174174
    175175        $templates = array();
    176176
    177         if ( ! empty( $category->slug ) ) {
    178                 $templates[] = "category-{$category->slug}.php";
     177  if ( ! empty( $category->slug ) ) {
     178    $decoded_slug = urldecode($category->slug);
     179                $templates[] = "category-{$decoded_slug}.php";
    179180                $templates[] = "category-{$category->term_id}.php";
    180181        }
    181182        $templates[] = 'category.php';