Solved

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

Posted on 2010-08-24
2
304 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Did you use a default hosting installation of wordpress with the intention of it being your actual site?  Maybe you’ve installed it as a Blog to your current site and recently converted it to be the main site and do away with the old .htm pages.  An…
Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…

749 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