All of a sudden custom post types returning a 404.

I've created a custom post type called Participant. There is a taxonomy called Offering applied to the Participant.  A Participant can fall into one or more Offerings. I'm using a Page with a template to display the different taxonomy archives. So essentially, not using the archive functionality for Offering. I'm using a loop with a link to Single Particpant page:

<?php 
			$terms = get_terms('artist');
				echo '<ul class="archive-terms">';
				echo '<li class="current"><a href="' . get_page_link('2603') . '">All</a></li>';
				foreach ($terms as $term) {
				    echo '<li><a href="'.get_term_link($term->slug, 'artist').'">'.$term->name.'</a></li>';
				}
				echo '</ul>';
			?>
			<ul class="participant-archive artist-archive">
			<?php $args = array( 'post_type' => 'participant', 'offering' => 'artist', 'post_status' => 'publish', 'posts_per_page' => 200, 'cache_results' => false );
							$loop = new WP_Query( $args ); ?>
		  		<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>		
		        <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		            <a href="<?php bloginfo('url') ?>/participant/artist/<?php echo lucidity_the_slug(); ?>"><?php $attachment_id = get_field('photo');
												$size = "custom-archive"; // (thumbnail, medium, large, full or custom size) ?>
							  <?php echo wp_get_attachment_image( $attachment_id, $size ); ?></a><br />
							  <?php if(get_field('long_name') !=false) : ?>
							  <h3 class="long-name"><a href="<?php bloginfo('url') ?>/participant/artist/<?php echo lucidity_the_slug(); ?>"><?php the_field('long_name'); ?></a></h3>
							  <?php else : ?>
							  <h3><a href="<?php bloginfo('url') ?>/participant/artist/<?php echo lucidity_the_slug(); ?>"><?php the_title(); ?></a></h3>
							  <?php endif; ?>
		        </li>
		        <?php endwhile; ?>
		   </ul>

Open in new window


This is working fine on my local machine, but on the remote server it's stopped working. I'm now getting a 404 when I click on any particpant.  And even when I click to view the post type from Admin, I'm getting  a 404.

http://2015.lucidityfestival.com/workshop-presentation/

I'm totally stumped on this one!
LVL 9
Alicia St RoseOwner & Principle Developer/DesignerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
Jason C. LevineDon't talk to me.Commented:
Try disabling permalinks (set it back to default), save it, then set permalinks back the way you had it.
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
@Jason C. Levine

Tried this and it didn't work. :(

@David Johnson, MVP

I'm confused by your response. Is there something wrong with the 301? We are redirecting the site from lucidityfestival.com.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Jason C. LevineDon't talk to me.Commented:
Okay, so I'm a little confused by how you've structured this.

The code above has:

<a href="<?php bloginfo('url') ?>/participant/artist/<?php echo lucidity_the_slug(); ?>">

But links at http://2015.lucidityfestival.com/workshop-presentation/ all take the form of:

http://2015.lucidityfestival.com/participant/workshop-presentation/jamie-janover

which gives a 404.  Going to:

http://2015.lucidityfestival.com/participant/artist/jamie-janover

also does a rewrite, then a 404 (which I think is what David is referring to) and

http://2015.lucidityfestival.com/participant/artist/

Just does a straight 404.  

1) Where is /artist/ coming from in the code above and where does it replicate on the sample page?

2) What redirects are in place?
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
@Jason C Levine

So sorry, I grabbed code from another template!
Here's the correct code that should take care of question #1:

<?php 
			$terms = get_terms('wisdom');
				echo '<ul class="archive-terms">';
				echo '<li class="current"><a href="' . get_page_link('2598') . '">All</a></li>';
				foreach ($terms as $term) {
				    echo '<li><a href="'.get_term_link($term->slug, 'wisdom').'">'.$term->name.'</a></li>';
				}
				echo '</ul>';
			?>
			<ul class="participant-archive wisdom-keeper-archive">
			<?php $args = array( 'post_type' => 'participant', 'offering' => 'workshop & presentation', 'post_status' => 'publish', 'posts_per_page' => 200, 'cache_results' => false );
							$loop = new WP_Query( $args ); ?>
		  		<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>		
		        <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		            <a href="<?php bloginfo('url') ?>/participant/workshop-presentation/<?php echo lucidity_the_slug(); ?>"><?php $attachment_id = get_field('photo');
												$size = "custom-archive"; // (thumbnail, medium, large, full or custom size) ?>
							  <?php echo wp_get_attachment_image( $attachment_id, $size ); ?></a>
							  <?php if(get_field('long_name') !=false) : ?>
							  <h3 class="long-name"><a href="<?php bloginfo('url') ?>/participant/workshop-presentation/<?php echo lucidity_the_slug(); ?>"><?php the_field('long_name'); ?></a></h3>
							  <?php else : ?>
							  <h3><a href="<?php bloginfo('url') ?>/participant/workshop-presentation/<?php echo lucidity_the_slug(); ?>"><?php the_title(); ?></a></h3>
							  <?php endif; ?>
		        </li>
		        <?php endwhile; ?>
		   </ul>

Open in new window


I've got pages for each archive and a specific template is loaded for each one.

2. The redirect is happening  on the lucidityfestival.com site. I'm using the Redirection plugin. I had to redirect the archive pages to the new site because old archives where showing up in the search results.
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
Anyone?
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
Nevermind, ya'll!

Turns out someone installed a Custom Post Type Permalink plugin behind my back and f%&$#d up the site.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jason C. LevineDon't talk to me.Commented:
Ah-ha.  No wonder we couldn't figure it out.  Everything posted looked correct...
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
I found out the issue was caused by an installed plugin.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.