- This topic is empty.
-
AuthorPosts
-
November 12, 2009 at 7:50 pm #26741
peb7268
MemberHi,
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.comThanks,
Paul
[email protected]November 15, 2009 at 6:50 am #66564davesgonebananas
MemberYour 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.
November 16, 2009 at 11:00 am #66642peb7268
MemberThanks 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
November 16, 2009 at 11:04 am #66643davesgonebananas
MemberSounds like some sort of Javascript problem. Ensure JS is enabled and you have debugging turned off.
November 16, 2009 at 11:15 am #66644peb7268
MemberHey 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?
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.