lees meer link gaat naar verkeerde pagina!
-
Hoi mede wordpressers!
Ik zit te knutselen aan een nieuw ontwerp van deze site.
Site zoals deze moet zijn is correct, maar de lees-meer knop op de voorbeeldpagina gaat niet naar het bericht (1 nieuwsitem aan het begin van de pagina) maar rechtstreeks naar .nl/voorbeeld-pagina/#more i.p.v. .nl/bericht
Heb geprobeerd dit op te lossen met <?php wp_reset_query(); ?> maar dat werkt dus niet.Iemand een idee?
Hier de code:
<?php get_header(); ?> <div id="feat"> </div> <div id="menu2"> <div id="menu2-wrapper"> <div id="top2"> <!-- PAGE MENU, OR PRIMARY CUSTOM MENU --> <?php if ( has_nav_menu( 'secondary-menu' ) ) { wp_nav_menu( array( 'menu_class' => 'sf-menu', 'theme_location' => 'secondary-menu' ) ); } else { ?> <ul class="sf-menu"> <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li> <?php wp_list_pages("sort_column=menu_order&depth=3&exclude=$ex;&title_li=");?> </ul> <?php } ?> </div><!-- END PAGE MENU --> </div> </div> <div id="clear"></div> <div id="zoek-wrap"> <div id="zoek"> <?php $search_text = empty($_GET['s']) ? "Typ uw trefwoord" : get_search_query(); ?> <div id="search"> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/"> <input type="text" size="put_a_size_here" name="s2" id="s2" value="" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/> <input type="submit" id="searchsubmit2" value="" class="searchbutton"/> </form> </div> </div> </div> <div id="clear"></div> <div id="mainwrap"> <div id="contentwrap-news"> <?php query_posts('showposts=1'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div <?php post_class(news) ?> id="news-<?php the_ID(); ?>"> <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink naar <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div id="featuredimg"> <?php the_post_thumbnail('homethumb'); ?> </div> <div class="entry"> <?php the_excerpt(); ?> <div class="clearfix"> </div><!-- CLEARFIX --> </div> </div> <?php endwhile; endif; wp_reset_query(); ?> <div id="meta-wrap"> <div class="meta"> <span class="author">Geschreven door <?php the_author(); ?></span> <span class="lees-meer"><a href="<?php the_permalink() ?>#more">Lees meer</a></span> </div><!-- META1 --> <div class="meta"> <span class="category">Geplaatst in categorie(ën) : <?php the_category(','); ?></span> </div><!-- META2 --> <div class="meta"> <span class="category">Er is/zijn: <a href="<?php the_permalink() ?>" rel="bookmark" title="Bekijk reacties op <?php the_title_attribute(); ?>"><?php comments_number( 'Geen reacties', '1 Reactie', '% reacties' ); ?></a></span> </div><!-- META3 --> </div><!-- METAWRAP --> <div class="clear"></div> </div> <?php wp_reset_query(); ?> <div id="contentwrap"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="entry"> <?php the_content(); ?> </div> <!--entry--!> <?php comments_template(); ?> <?php endwhile; ?> <?php endif; ?> </div> </div> <?php get_footer(); ?>
Alvast bedankt!
3 reacties aan het bekijken - 1 tot 3 (van in totaal 3)
3 reacties aan het bekijken - 1 tot 3 (van in totaal 3)
- Het onderwerp ‘lees meer link gaat naar verkeerde pagina!’ is gesloten voor nieuwe reacties.