Solved

Can't get Custom Post Type to display after select with Drop Down List

Posted on 2010-08-24
2
305 Views
Last Modified: 2012-05-10
I have created a custom post type, and it works ok.  I can go to the edit screen and click on 'View' and it properly uses the correct template to show the single custom post type.

I then have a page with the following code:
<form action="<?php bloginfo('url'); ?>" method="get">
        <div>
		<?php wp_dropdown_categories(array('taxonomy' => 'Membership Category')); ?>
        <input type="submit" name="submit" value ="view" />
        </div>
        </form>

Open in new window


When you select a term from the drop down list, I get a Error 404 page not found.  This is the link that it is trying to show:
webste/wp-development/?cat=16&submit=view

It seems like the permalinks/redirect is not working properly.

In my custom post type setup, I have this:
function memberlist_register() {
 
	$labels = array(
		'name' => _x('Member List', 'post type general name'),
		'singular_name' => _x('Member List', 'post type singular name'),
		'add_new' => _x('Add New', 'member list'),
		'add_new_item' => __('Add New Member'),
		'edit_item' => __('Edit Memeber'),
		'new_item' => __('New Member'),
		'view_item' => __('View Member'),
		'search_items' => __('Search Member'),
		'not_found' =>  __('Nothing found'),
		'not_found_in_trash' => __('Nothing found in Trash'),
		'parent_item_colon' => ''
	);
 
	$args = array(
		'labels' => $labels,
		'public' => true,
		'publicly_queryable' => true,
		'show_ui' => true,
		'_builtin' => false,
		'query_var' => true,
		'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',
		'capability_type' => 'post',
		'hierarchical' => true,
		'rewrite' => array ('slug' => 'memberlists'),
		'menu_position' => null,
		'supports' => array('title','thumbnail')
	  ); 
 
	register_post_type( 'memberlist' , $args );
}

Open in new window


I have went to the permalinks in setup and re-saved everything to flush the permalinks.

0
Comment
Question by:keith1001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33528524
I know this is kind of a "hack fix", but have you attempted to download simple 301 redirects plugin: http://wordpress.org/extend/plugins/simple-301-redirects/

Then in the 301 redirect settings you would put:
webste/wp-development/?cat=16&submit=view

And in the second URL box of the 301 Redirect Settings page you would put:
webste/wp-development/"whatever the category is you are tying to link to"

Let me know  if this helps.
0
 

Accepted Solution

by:
keith1001 earned 0 total points
ID: 33557265
What I had to end up doing was create my own function for the drop down list.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Like there are many different versions of Wordpress, there are also a handful of related side projects WordPress users should be familiar with.   All of these projects are open source and GPL licensed, which means there are few restrictions to us…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question