Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress – Taxonomy -> Ob errors

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26741
    peb7268
    Member

    Hi,

    Im using the code blue revolution theme and tried to add code to my
    functions.php file to create custom taxonomies.

    It is showing the fields on login to admin but after a second
    Im getting a headers already sent error, and it wont pull up the page any more after saving the content. Any suggestions?

    Here is the code:

    <?php

    add_action( ‘init’, ‘create_my_taxonomies’, 0 );

    function create_my_taxonomies() {
    register_taxonomy( ‘Year’, ‘post’, array( ‘hierarchical’ => false, ‘label’ => ‘Year’, ‘query_var’ => true, ‘rewrite’ => true ) );
    register_taxonomy( ‘Make’, ‘post’, array( ‘hierarchical’ => false, ‘label’ => ‘Make’, ‘query_var’ => true, ‘rewrite’ => true ) );
    register_taxonomy( ‘Model’, ‘post’, array( ‘hierarchical’ => false, ‘label’ => ‘Model’, ‘query_var’ => true, ‘rewrite’ => true ) );

    }
    ?>

    Here is the site:
    http://autoexpertscenter.com

    Thanks,

    Paul
    [email protected]

    #66564

    Your syntax for register taxonomy is wrong. It should be :

    Code:
    register_taxonomy( ‘Year’, ‘page’, array(
    ‘hierarchical’ => false,
    ‘label’ => ‘Year’,
    ‘query_var’ => ‘car-year’,
    ‘rewrite’ => array(‘slug’ => ‘car-year’)
    ));

    I used ‘car-year’ because year might get confused with the post’s publish date year.

    #66642
    peb7268
    Member

    Thanks for the reply!

    This is a little off topic, but do you know what would cause the admin panel and widget area to malfunciton?
    The content is visible but you cant drag and drop anything and if you click on screen options and change them nothing
    happens, none of the options work for customizing the panels (by clicking the drop-down triangles) in the admin area either.

    Any ideas?

    Thanks again!

    Paul

    #66643

    Sounds like some sort of Javascript problem. Ensure JS is enabled and you have debugging turned off.

    #66644
    peb7268
    Member

    Hey Dave,

    It is. I have everything turned on and no debugging is on.

    Do you think I could dl a fresh copy of WP and just replace my old JS folder with a new one? Or would that screw something up?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.