Got it — needed to use a walker function. I used a slightly modified version of the one in this tutorial
The main thing I modified was changing
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url) .'"' : '';
to
$attributes .= ' href="#' . esc_attr( basename(get_permalink()) ) .'"' ;
but I will probably refactor the whole thing
Related Posts:
- menu link to custom post_type?
- Adding custom post category slug in permalink causes 404 error for pages and posts
- How can I use get_post_meta with add_rewrite_rule to build custom permalinks?
- Allow post/page hierarchy across different post types?
- Permalink for a custom post type isn’t working and I don’t know why
- Can’t get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together
- Add custom post type settings to wordress default posts
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- WordPress Custom Post Type Permalinks dynamic term slugs
- How to have the same url structure for both a CPT and a Taxonomy?
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- create a subcatagory for a custom post type and out put url as posttype/subcategory/item
- How can achieve this permalink perfectly? domain.com/%category%/%post-name%
- custom-taxonomy/post_name instead of the default post_type/post_name
- Show custom post archive when custom post not specified
- Show custom post type relationships by taxonomy
- Assign same parrent Page to pages AND custom post types
- Can’t remove front from permalinks for custom taxonomy category page
- WordPress custom post type permalink rewrite shows page not found
- How to set a CPT to have a page as a parent, then rewrite urls accordingly?
- Completely remove custom post type permalinks (“One Page” website)
- Using taxonomy term in CPT permalink – Pages 404’s
- Removing custom post type slug from URL
- How to add rewrite rule to custom post type with parent in url with cpt ui?
- Custom post type as home page with custom url
- Customize Custom Post Type URL
- Create a custom php page and load it at a specific slug
- URL rewrite add author as base
- Remove CPT name from permalink but add %category% instead
- page menu entry for custom post type
- Permalinks /country/city/cpt/postname/
- Custom Permalink to remove category word , keeping posts permalink with date?
- Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types
- Seamless permalinks between Custom Taxonomy and Custom Posts
- How to display custom WP menus?
- Custom post type and custom taxonomy with the same slug using the file page taxonomy only as directory
- Need help with permalink rewrites for Custom Post Types with hierarchical relationships
- Custom Post Type Permalink empty
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Change custom post type permalink to show name of post from another custom post type?
- Custom Post Type Permalink
- Permalinks for custom post type
- How to have this permalink structure: post_type/postname/custom_inner_page
- Additional section in custom post type permalink
- How to include term custom meta into the custom taxonomy term permalink structure
- Blog posts for custom post type only
- Path to custom post type
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Parent Page and Breadcrumb URL’s for Custom Post Types Not Working
- Permalinks: custom post type -> custom taxonomy -> post
- Custom post type archive pagination 404
- CPT’s with landing page instead of archive – Url Rewrite?
- How to change permalink to include custom post type
- Is there a way to establish parent/child relationship in WP menu links exclusively?
- Removing Custom Permalink Structure for Custom Post Type
- Custom post type, permalinks, taxonomies and blog posts
- Custom post type permalink tag 404
- Custom post type permalink returns 404
- Use custom walker to add taxonomy terms to main nav menu
- Use the same date-based permalink structure for all post types
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- permalink /category/post-name with custom post type and taxonomy
- “Post name” permalink returns home page for custom posts
- A page that shows a list of a specific custom post type
- Custom post type and taxonomy permalinks
- Hierarchical permalinks for custom post type and taxonomy
- How to organize hierarchical structure in custom post type with taxonomy (like with categories)
- Make custom post types and pages place nice, re: rewrite
- Custom Post Fields at the beginning of a Custom Permalink
- Flush Rewrite Rules when new site is created on network
- Pretty URLs and custom post types
- Form action doesn’t work if slug isn’t same as custom post title
- How to make permalink structure %category%/%postname%/ work for custom post type?
- set permalink for CPT
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- Lost of query parameter when using permalink
- Custom permalinks rules don’t match and lost of query var in the process
- Custom Post Type – Duplicate Page Slugs
- Single custom post type’s menu ancestor/parent is Posts archive page
- Rewrite rule for Custom post type Monthly and Yearly archive
- Different results between permalink and query var search
- Custom permalink with child taxonomy terms
- Custom post type Permalinks with hierarchical Taxonomies
- Review site custom post type structure
- 404 in custom post type feed with mistake permalink
- Custom Post Types in the WordPress Navigation Menu
- Add a permalink variable onto custom post type URL after post name slug
- Remove permalink for custom post type
- Permalink misbehaving in Custom Post Types
- Check post on publish for blank title
- How to solve this custom post type goes to 404 page?
- Best way to specify “article type” in URL
- Template files for Custom Post Type and Taxonomy
- How to Create Template File for Parent Page of Custom Post Type
- How do you create %post_type%/%postname%/ permalink structure?
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Changed permalink structure of CPT – should I redirect?
- Custom Post Type & Custom Menu Walker to append custom class for active post types