686 reputation
49
bio website rachelcarden.com
location Alabama
age 30
visits member for 3 years, 6 months
seen May 28 at 16:38

I'm a High Ed Web Developer, with a fondness for WordPress, who loves puzzles and gets way too excited about programming and problem solving.

I like to tweet about all kinds of stuff, but mostly WordPress, Higher Ed Web, and all things Disney and Alabama football.

I have a WordPress plugin that I'm rather fond of.

And a blog, too.


Mar
13
awarded  Revival
Mar
13
awarded  Yearling
Feb
25
comment Automating the process of shortcode generation in a plugin - how is it done?
@nelson Check out the second example on the add_shortcode() page of the codex. The $atts variable represents the attributes you passed to your shortcode. So lets say you place "[book id="3" ISBN="12345"]" in your content. "id" and "ISBN" are array keys that will be stored in $atts so then you can use them in your function code. You can use them however you like. They do not have to be printed to the page.
Feb
20
comment Automating the process of shortcode generation in a plugin - how is it done?
WordPress developers aren't automatically generating shortcodes when posts are created or edited. The shortcode already exists but it requires attributes about the post you're editing, for example the post ID or one of the post custom fields, like the ISBN number, so once those values are generated, the developer displays what the shortcode would look like with the attributes: [book ID="1" ISBN="1234567789"]
Nov
5
comment URL rewrite and navigation structure for wordpress custom post type
You still need to include add_rewrite_rule( 'artists/([^/]+)/discography/?', 'index.php?artists=$matches[1]&discography=yes', 'top' ); If you add that back and it still doesnt work, it could be the order in which they're declared so reverse it and see if that works. I'd also download the Rewrite Rules Inspector plugin which will help you out a lot.
Nov
4
comment URL rewrite and navigation structure for wordpress custom post type
If you want to add a rewrite rule for a specific album, then add add_rewrite_rule( 'artists/([^/]+)/discography/([^/]+)/?', 'index.php?artists=$matches[1]&discography=yes&albums=$matches[2]', 'top' ); BUT WordPress will only allow one post type per query so if albums are the main content, then you'll need to change 'artists' to a custom query var: add_rewrite_rule( 'artists/([^/]+)/discography/([^/]+)/?', 'index.php?album_artist=$matches[1]&discography=yes&albums=$matches[2]', 'top' ); Then setup 'album_artist' like you did 'discography' and you can use that variable in your template.
Nov
3
answered URL rewrite and navigation structure for wordpress custom post type
Oct
1
comment add_rewrite_rule - working fine but broken for pagination
You're most welcome! Glad I could help.
Oct
1
answered add_rewrite_rule - working fine but broken for pagination
Jul
11
comment Make a custom column sortable, by custom post count
Awesome! Glad to help!
Jul
3
answered Make a custom column sortable, by custom post count
May
16
answered Add Post Screen Keep Category structure
Mar
10
awarded  Yearling
Sep
16
awarded  Nice Answer
Aug
26
awarded  Commentator
Aug
26
comment Custom Post Type Slug / Page Slug Conflict - Prevent use of reserved slug on page save?
I answered your question. :)
Aug
26
answered Is slug “type” reserved and can't be used in taxonomy rewrite?
May
29
comment Nested custom post types with permalinks
@Segfault You can use get_terms(), if you're using a CPT-onomy, or get_posts() to retrieve the post names/slugs.
May
29
comment Nested custom post types with permalinks
@Segfault You will have to retrieve all of the author slugs so you can hard code them into the rewrite rule(s): foreach( $author_slugs as $author_slug ) { add_rewrite_rule( '^authors/' . $author_slug . '/([^/]*)/([^/]*)/?','index.php?authors=' . $author_slug . '&chapters=$matches[2]','top' ); add_rewrite_rule( '^authors/' . $author_slug . '/([^/]*)/?','index.php?authors=' . $author_slug . '&books=$matches[1]','top' ); }
May
23
comment Archive page for custom post type not working
Do you have any other content in your site that might have a conflicting URL? Any pages with a slug/page name of 'case'?