Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter Rhand

    (@rhand)

    Hmm, the read more tag <!--more--> does not show on a post either while I do use

    <?php the_content('<p class="serif">Read the rest of this article &raquo;</p>'); ?>

    Thread Starter Rhand

    (@rhand)

    Found out I need a custom query as well @ http://weblogtoolscollection.com/archives/2007/07/09/the-more-tag-on-a-wordpress-page/ to get the more link to display the rest and adjusted the more data a bit was well:

    <?php
    global $more;
    $more = FALSE;
    ?>
    <?php the_content("Lees de rest van deze pagina &raquo;"); ?>
    <?php $more = true; ?>
    Thread Starter Rhand

    (@rhand)

    There is a thread about it here: http://wordpress.org/support/topic/113544?replies=18 , but it shows the same data without a need wp_query.

    NB Read More link does work as it should on the index now. Just not on page.php with the earlier mentioned added code

    Thread Starter Rhand

    (@rhand)

    Hmm, not solved yet. Reading http://wordpress.org/support/topic/168032?replies=20 and using this code for now:

    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
    <div class="entry">
    <?php global $more;$more = 0;?>
    <?php the_content("Lees de rest van deze pagina »"); ?>

    Still get a link that leads to nowhere: http://www.domain.com/portfolio/#more-16

    Thread Starter Rhand

    (@rhand)

    Anyone?

    Thread Starter Rhand

    (@rhand)

    Bump

    Thread Starter Rhand

    (@rhand)

    Well $more and $more_link_text are mentioned in post-template.php , deprecated.php, classes.php, comment-template.php, and feed-feedtype.php. I start to think I might need $more_link_text only or that I least need to add it to my code. But the $more_link_text should be part of my code already as I use the_content function (see http://codex.wordpress.org/Function_Reference/the_content).

    Thread Starter Rhand

    (@rhand)

    Read http://wordpress.org/support/topic/328514?replies=10 and am trying some other code options.

    Thread Starter Rhand

    (@rhand)

    No luck yet either with making $more global just after the header and declaring $more 1 just before the_content()

    Thread Starter Rhand

    (@rhand)

    Thread Starter Rhand

    (@rhand)

    I’d say this can only be achieved with a query_posts() or maybe a WP_Query. Query_posts can be easily used on the index or home page, but I am still wondering how I could use query_posts just to display the read more tag on pages. Maybe I should just go for an excerpt. I read somewhere there is a plugin for it.
    Pages in WordPress seem to be really limited. I should have gone for a category, or maybe I should consider a template for the page where I want the read more tag to show.

    Thread Starter Rhand

    (@rhand)

    Well, made a template with query_posts, but still no functioning read more that links to the full page:

    <?php
    /*
    Template Name: Portfolio page
    */
    ?>
    <?php get_header(); ?>
    
    <div id="content" class="narrowcolumn">
    <?php
    //The Query
    query_posts('pagename=portfolio');
    global $more;
    ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php $more = 0;?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
    <div class="entry">
    
    <?php the_content('Lees de rest van deze pagina »'); ?>
    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    </div>
    </div>
    <?php endwhile; ?>

    Link still returns the same data (page text until read more. Link is: http://www.domain.com/portfolio/#more-16

    Thread Starter Rhand

    (@rhand)

    Will work on code here: http://wordpress.pastebin.com/f2xeiD4A

    Thread Starter Rhand

    (@rhand)

    Trying query_posts preservation: http://wordpress.pastebin.com/dJDtwAXT . No luck yet either. Must still be missing something..

    Reading through this entire thing I understand that it’s not working the way you want it to work, but I still don’t understand what exactly it is you want to happen. Can you please describe exactly what you want to happen in addition to your explaination of how it is working incorrectly?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Read More link leads nowhere on page’ is closed to new replies.