119 reputation
8
bio website kristinachilds.com
location Seattle
age
visits member for 1 year, 6 months
seen Jan 9 '13 at 17:54

Dec
4
accepted Apply custom role capabilities to administrator (without plugin)
Dec
4
comment Apply custom role capabilities to administrator (without plugin)
Nevermind, the file wasn't updating for some reason! Yes, this works beautifully, thank you so much. For anyone else coming across this, all you need is this code and the single line add_role( 'artists_relations', 'Artist Relations', array( 'post_artists' ) ); to register the role. No capabilities array in register_post_type and add_theme_caps isn't needed at all. Again, Matthew, thank you for such an elegant solution! Best I've seen yet. I did have to add read to the array, though :)
Dec
4
comment Apply custom role capabilities to administrator (without plugin)
Yes, and still no artist tab in the sidebar. Blarg.
Dec
4
comment Apply custom role capabilities to administrator (without plugin)
Also, what do you mean by reset capabilities? What in this code "resets" it?
Dec
4
comment Apply custom role capabilities to administrator (without plugin)
Thanks, I've added the registration. I guess I didn't wholly grasp what the capability_type really meant. I thought if it was post then it would behave like a post. Re-reading the codex just makes me more confused :( Unfortunately, though, making that change didn't cause it to show up in admin view.
Dec
4
revised Apply custom role capabilities to administrator (without plugin)
added 1582 characters in body
Dec
4
asked Apply custom role capabilities to administrator (without plugin)
Nov
28
asked using rewrites to secure login page
Nov
27
revised How can i move search results onto a specific page?
added 14 characters in body
Nov
26
answered How can i move search results onto a specific page?
Nov
20
accepted Custom post types not using archive structure
Nov
15
answered Custom post types not using archive structure
Nov
14
comment Listing custom post types on archive page with array
I took your advice to solve a larger issue of the wordpress template hierarchy not working at all. It was using page.php template to display custom post type archive, but when I deleted all pages it would use nothing at all. I got it working in the sandbox so it's a conflict somewhere else. +1's to you for suggesting that... I may have banged my head a lot longer before doing that.
Nov
14
accepted Listing custom post types on archive page with array
Nov
14
answered Listing custom post types on archive page with array
Nov
14
comment Custom post types not using archive structure
I decided to take someone else's advice and start a fresh install to make a test area for this. All this code works like a charm in the other install, even using the same database, so something else in my theme is conflicting with it. sigh It'll be an arduous process, but I'll start fresh in the morning and post whatever I find here so maybe someone else will be spared the headache.
Nov
13
comment Custom post types not using archive structure
Bah. I had a page set up from forever ago called "artists" and now that I deleted that from the pages area it's not working again. How is it that wordpress doesn't see this post type has an archive?
Nov
13
comment Custom post types not using archive structure
Found it. For some odd reason it's using page.php. I can force it to use a certain template, but would like to know what is going wrong to cause it to use this instead of the archive page.
Nov
13
comment Custom post types not using archive structure
On that line of thought, I changed 'rewrite' => array('slug' => 'artists') to 'rewrite' => true and flushed the permalinks. That at least got it to come up as site.com/cpt/ which is a start. So I changed it back to 'rewrite' => array('slug' => 'artists') and now it's coming up as site.com/artists/ but it's not using the archive template or archive.php. I'm in the process now of trying to figure out what file it's using, but I have body text in all the docs saying what the filename is and I don't see that anywhere on the page. Strange.
Nov
13
comment Custom post types not using archive structure
that didn't work :(