Enabling the "more" tag for PAGES

Community Forums Forums Design Tips and Tricks Enabling the "more" tag for PAGES

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Jumpringer 1 year ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #74850

    Jumpringer
    Participant
    Post count: 35

    Requesting assistance with enabling the “more” tag for pages.

    I installed the “Read More Right Here” plugin for how it handles “read more” – by displaying or hiding content on the same webpage, without jumping to a new page.

    The plugin does have a checkbox to enable it to work on PAGES, which refers to WP Codex:

    Per WordPress Codex, here is the code to enable the “more” tag on PAGES (not posts):

    Please remember that the “Read More” tag is used only on the Home page which shows the latest posts. It does not work in “Pages”. If you want to turn it on in Pages too for showing a set of partial posts, use the following code inside the loop for the dynamic content:

    <?php
    global $more;
    $more = 0;
    ?>
    //The code must be inserted ahead of the call the_content, but AFTER the_post()

    <?php the_content(‘Continue Reading’); ?>

    I am not sure where to add this code, or if it can be added as a hook.

    If you can point me in the right direction, please advise…thanks.

    http://jumpgraphix.com/stage/dev/catzen_forensic/content/?page_id=11
    #75169

    nutsandbolts
    Keymaster
    Post count: 3187

    Am I understanding correctly that you want to hide some of the content on your page until the visitor clicks a link? So they would click the link and more content would display under what they’ve already read? If so, this tutorial might help you: http://www.wpbeginner.com/plugins/how-to-show-and-hide-text-in-wordpress-posts-with-the-toggle-effect/


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #75297

    Jumpringer
    Participant
    Post count: 35

    Thanks, Andrea, this is what I am looking for.

    A limitation of the ShowHide plugin is that it only allows for one instance of “read more/read less” per page.

    The plugin’s creator does have some instruction on how to enable multiple show/hides, so I’m trying to get clarification on that.

    Much appreciated!

    #75301

    Jumpringer
    Participant
    Post count: 35

    For anyone who might be interested, this script enables read more/less on a page, with multiple instances.

    http://www.jasondahlin.com/2011/coding-tips/javascript_readMore-orLess.asp

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Enabling the "more" tag for PAGES’ is closed to new replies.