We're merging with GenerateBlocks! Learn more here.

[Resolved] Post order

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Post order

Viewing 15 posts - 16 through 30 (of 33 total)
  • Author
    Posts
  • #9855
    Tom
    Keymaster

    The latest version of GP Premium (1.8.3) fixed the issue with Sections. It should remain in the “Text” tab now, so it won’t convert the character.

    #9932
    Rolandas
    Participant

    Thank you.
    Everything works great

    #9946
    Tom
    Keymaster

    Awesome 🙂

    #12214
    Daniel
    Participant

    I’m replying to this thread because I’m having a similar issue. When I enter the following WPSP shortcode into a Gutenberg shortcode block, it works. The problem: the next time I edit the page with that shortcode, Worpdress/Gutenberg converts/escapes the ampersands from “&” to “&”

    [wp_show_posts id=”33309″ settings=”meta_key=priority&orderby=meta_value&order=ASC”]

    I can circumvent the issue by entering the shortcode directly into editor as a text block. I’d prefer not to do this, since managing a page is easier/cleaner when its shortcodes are in shortcode blocks.

    Note: I’m not using GP “sections” — only GP and WP Show Posts.

    Any thoughts?

    #12291
    Tom
    Keymaster

    Just to confirm, this is happening in the Gutenberg shortcode block?

    #12298
    Daniel
    Participant

    Yes, all the behavior I describe happens in the editor, in the Gutenberg shortcode block.

    #12320
    Tom
    Keymaster

    Hmm good to know, we may need to come up with an alternative to & in a future version.

    Thanks!

    #12333
    Daniel
    Participant

    Sure thing, Tom. Please keep me posted. Ideally, there’s a solution that does not break existing WP Show Post shortcodes being used.

    And also, just for clarification (since the ampersand code is converted to the symbol in this comment window), here are images.

    What is first saved:
    Ampersand-shortcode-encoded

    What appears upon attempting to re-edit the page:
    Ampersand-shortcode-encoded

    Thanks also for your continued work on GP and this plugin,
    Dan

    #12360
    Tom
    Keymaster

    Thanks for that – I’ll see if we can use | as a separating character as well.

    #15568
    Greg
    Participant

    Sorry for digging up an old thread, but I’m having the same issue as Daniel’s post above – happening with both a shortcode block and just a Custom HTML block, when the page is saved it’s fine – but whenever the edit page is opened again the & character has added ‘amp;’ afterwards – any ideas on a fix for this?

    Thanks
    Greg

    #15586
    Tom
    Keymaster

    Unfortunately there is no way around this at the moment.

    #15592
    Greg
    Participant

    Hi Tom,

    That’s a shame, do you know of any other way I can sort posts by both Category and Tag, or even multiple Tags (so that it only shows posts which meet all tags rather than any single one selected)?

    Thanks for the help
    Greg

    #15603
    Tom
    Keymaster

    Kind of silly, but you could build a “wrapper” shortcode:

    add_action( 'my-posts-shortcode', function() {
        ob_start();
            $settings = array(
                'meta_key' => 'priority',
                'orderby' => 'meta_value',
                'order' => 'ASC',
            );
    
            wpsp_display( 123, $settings );
        return ob_get_clean();
    } );

    Then you could add this to your block: [my-posts-shortcode]

    #15612
    Greg
    Participant

    Hi Tom

    I tried this but it just showed the text name for the shortcode on the front end – I also tried ‘wp_show_posts id=my_posts_shortcode’ which didn’t work either.

    Would you be able to give me an example for creating a snippet shortcode that pulls posts in via a specific category name/ID and tag name/ID if that’s possible?

    Thanks
    Greg

    #15614
    Greg
    Participant

    Just found a solution to this via a reply you had helped someone with on another thread, I changed my setting so that the list selects the category and then the shortcode setting filters by tag, eg:

    [wp_show_posts id="123" settings="taxonomy=post_tag&tax_term=tag-name-here"]

    Seems to be working!
    Thanks, Greg

Viewing 15 posts - 16 through 30 (of 33 total)
  • You must be logged in to reply to this topic.