WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] permalink redirect to index (2 posts)

  1. ellie91
    Member
    Posted 1 year ago #

    I am working with some updates on a wp-site.
    One page has a list of employees wich are displayed with pictures as posts, but something has happened now so that when you click the posts permalink you get redirected to the index page - title saying "page not found".

    Anyone had this problem?
    It used to work and suddenly stopped working after some css-changes.

    This is the code which includes the permalink

    <?php $loop = new WP_Query( array( 'post_type' => 'konsult', 'posts_per_page' => 100, 'meta_key' => 'dbt_last', 'orderby' => 'meta_value', 'order' => 'ASC' ) ); ?>
    				<?php $alt = ''; ?>
    				<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    				<div class="consult<?php if ($alt=='') { $alt = 'alt'; }
    				else { echo ' right'; $alt = ''; } ?>">
    					<?php if(function_exists( 'add_theme_support'  ) && has_post_thumbnail()):?>
    					<div class="image">
    						<?php $attr = array('class'	=> "", 'alt'	=> "", 'title'	=> ""); ?>
    						<a href="<?php the_permalink() ?>"><?php the_post_thumbnail('', $attr ); ?></a>
    					</div>
    					<?php endif; ?>
    					<?php the_title('<a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '">', '</a>' ); ?><br />
    					<?php echo get_post_meta($post->ID, 'dbt_bef', true); ?>
    				</div>
    				<?php endwhile; ?>
  2. ellie91
    Member
    Posted 1 year ago #

    I updated htaccess-file and updated permalinks through adminpanel, now it works

Topic Closed

This topic has been closed to new replies.

About this Topic