• I am busy with a gallery-website which shows paintings from a artist. The paintings are divided into years of making…2007,2008,2009 etc.

    Most pages have only a few paintings so they wil not cause the layout to grow vertically. But the page for 2009 already has about 20 images while there actually is space for only 8 images.

    If there are more images, another row, a scrollbar will appear within the content-DIV that shows the images.

    But!

    I would like to arrange it in such a way every page with 8 images gets a (easy addable for the enduser) ‘see more’ link…which takes a visitor to page 2 of 2009 with another 8 images.

    All this of course without ruining the menu with all kind of options like: 2009-2, 2009-3 etc. These ‘extra’ pages are just there on the 2009 page.

    So I thought I use the more-tag! Was I right?

    …but of course this isn’t working…

    …is there a solution for this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • To use the <!-- more --> tag in pages you have to specifically set $more as a global variable within the the template. So immediately after the opening <?php, add global $more;.

    Step 2: move down to where you call the_content(). Just before this add $more = 0;

    <?php $more = 0;the_content(); ?>

    And that’s it!

    Thread Starter kcire

    (@kcire)

    Hey Esmi,

    After which opening <?php?!?

    On the page.php? There the following is the first PHP tag:

    <?php get_header(); ?>

    should I change this to:

    <?php global $more; get_header(); ?>

    ?

    Thread Starter kcire

    (@kcire)

    I did as I stated in my previous post…there seems to appear a ‘more’ link…but when I click it, hoping for a next page, the whole layout is messed up and ‘all’ images are shown on top of it…

    What am I doing wrong?

    <?php global $more;get_header(); ?>

    Sounds like there may be other issues within that theme.

    Thread Starter kcire

    (@kcire)

    I was afraid of that…

    Any suggestions on what to do?

    Is there a way to manipulate the URL is produces? Because when clicked on the ‘more’ link the URL ends with: /archives/#more-1 (or something similair).

    While it came from a URL ending with: archives/category/2009/

    the ‘category’ is gone…?!

    Thanks for all your attention by the way!

    Is there a way to manipulate the URL is produces?

    Not without some serious hacking of the WP core files.

    Thread Starter kcire

    (@kcire)

    Mmhh…I will look into further…if I have found a solution I guess it’s nice if I mention it here.

    Hopefully I find a solution and remember to put it up here!

    Esmi, thanks a million for all your assistance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘more option possible on Pages?’ is closed to new replies.