[Resolved] Archive page with WPSP and Element on top versus pagination

Home Forums Support [Resolved] Archive page with WPSP and Element on top versus pagination

Home Forums Support Archive page with WPSP and Element on top versus pagination

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

    I’m trying to build a ‘magazine style’ page by:

    – Making a new page with a sidebar on the right and hiding the page title
    – Showing posts with WPSP for a certain category, in 2 columns and pagination, with offset=2
    – Adding an Element (hook) on top (inside_container) of the page, with a h1 heading and WPSP showing two ‘featured’ articles.

    That looks great, so far so good. First the heading and 2 larger articles, without a sidebar, then the other articles.

    But the Element should only show on the first page. I tried adding the php from this supoort topic in a a snippet. That didn’t work. Added the code in the Element, but that also didn’t work.

    The h1 heading has to show on all pages so I assume I have to put that in a separate Element.

    Can you help me out?

    #1332455
    David
    Staff
    Customer Support

    Hi there,

    try wrapping your WPSP Shortcode in a condtion like this:

    <?php
    if ( !is_paged() ) {
        echo do_shortcode( '[wpsp shortcode here]' );
    }
    ?>
    #1332502
    Bas

    Works like a charm, great! Many thanks!

    #1332618
    David
    Staff
    Customer Support

    Awesome – glad to be of help

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.