Title: Rewriting Core Variable Using functions.php
Last modified: August 20, 2016

---

# Rewriting Core Variable Using functions.php

 *  [amanindesign](https://wordpress.org/support/users/amanindesign/)
 * (@amanindesign)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/rewriting-core-variable-using-functionsphp/)
 * I want to rewrite a wordpress core varaible on wp-includes/category-template.
   php line 163
    `$rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks())?'
   rel="category tag"' : 'rel="category"';` I want to use functions.php within my
   theme files to overwrite this variable. I’ve added a filter
 * `add_filter('get_the_category_list', 'rewrite_rel' );`
 * But I am stuck on the function portion, need help! Below is what I have
 *     ```
       function rewrite_rel($result, $show) {
       switch ($show) {
       case 'rel':
       $return = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="chapter"' : 'rel="chapter"';
       break;
       default:
       }
       return $result;
       }
       ```
   

The topic ‘Rewriting Core Variable Using functions.php’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [REL](https://wordpress.org/support/topic-tag/rel/)
 * [variables](https://wordpress.org/support/topic-tag/variables/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [amanindesign](https://wordpress.org/support/users/amanindesign/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/rewriting-core-variable-using-functionsphp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
