We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • in reply to: Sort By Custom Field Value #35564
    Ben
    Participant

    Thanks Elvin, unfortunately this code just blanks the page (except for the header).

    I tried similar code previously and had the same problem each time – no content below the header.

    in reply to: Sort By Custom Field Value #35554
    Ben
    Participant

    Thanks Elvin, I created a custom field using ACF. It’s a number field. Unfortunately I can’t use date as ‘time’ is the length of time of a bike ride, see the output of the WP Show Posts here (https://rideorange.com.au/routes/).

    I tried using a filter to do the same following code examples in the forum but I couldn’t get it to work. This shortcode works but every time I edit the page i’ll need to correct the shortcode settings to make sure it keeps working which isn’t the end of the world, just not ideal…

    in reply to: Sort By Custom Field Value #35519
    Ben
    Participant

    I’m using the Alpha version of WP Show Posts 1.2.0 Alpha3 too.

    in reply to: Sort By Custom Field Value #35516
    Ben
    Participant

    So in the Classic block, it doesn’t get converted but the orderby isn’t working either.

    in reply to: Sort By Custom Field Value #35498
    Ben
    Participant

    Thanks Elvin, already running 5.8.2, will disable all plugins and get back to you.

    in reply to: Sort By Custom Field Value #35491
    Ben
    Participant

    Can’t seem to edit the post again, here is a screen grab example:

    https://www.dropbox.com/s/se6wbif8fw65ll3/wp-show-posts.png?dl=0

    in reply to: Sort By Custom Field Value #35485
    Ben
    Participant

    Hi Guys,

    I’m using this shortcode to sort my posts by a custom field and it works well, except WordPress is converting the & to html character & (and amp semi-colon) each time I edit the page resulting in the code not working – is there a way to stop this?

    ie.

    [wp_show_posts id="213" settings="meta_key=time&orderby=meta_value_num&order=ASC"]

    Just realised this forum is doing the same thing so I can’t show the example…

    Thanks,
    Ben

    • This reply was modified 1 year, 2 months ago by Ben. Reason: correct spelling
    • This reply was modified 1 year, 2 months ago by Ben.
    • This reply was modified 1 year, 2 months ago by Ben.
    in reply to: Add a custom class to the post #10135
    Ben
    Participant

    thanks Tom, will do

    in reply to: Add a custom class to the post #10129
    Ben
    Participant

    Thanks Tom, that’s perfect & so simple.

    On a side note, i’m trying to write some functions using custom post types & custom terms and struggling – do you recommend any WP forums I could ask questions?

    in reply to: Filter to Change Image Link #9765
    Ben
    Participant

    Excellent, thanks Tom – i’ll give it a go.

    Cheers,
    BEn

    in reply to: Order by Custom Field #5312
    Ben
    Participant

    Thanks Tom, that seems to have worked. You’re a lifesaver (again!).

    Anything else I should do?

    in reply to: Order by Custom Field #5297
    Ben
    Participant

    Hi Tom,

    Further to this, I am having an issue with the sorting on a non-custom field – ID. If you have a look at this page (https://www.orangewinefestival.com.au/event-program/weekend-two-events/), you will see numbers at the bottom of each event (882, 883 etc) these are the ID’s for each Event, using get_the_ID(). Notice that even though I am ordering by ID, set to ASC, it isn’t working.

    Note I have removed the ‘settings’ from my WPSP shortcode, so it’s just [wp_show_posts id=”27″ ]

    Also when I set the order in WPSP to DESC it changes the order, but it still isn’t correct.

    This is getting to be an urgent issue now so any help would be appreciated – thanks.

    Ben

    in reply to: Order by Custom Field #5282
    Ben
    Participant

    Hi Tom,

    Sorry to bring this up again. I’m having an issue with this method and was wondering if you could shed any light.

    The code works OK when I use a WPSP List to show all posts for my CPT (Events)(eg. https://www.orangewinefestival.com.au/event-program/events-program/), but when I choose a taxonomy (event_type) it stops working (eg. https://www.orangewinefestival.com.au/event-program/weekday-events/).

    I am using a custom field to sort by, a field I have created called event_id, which is a number field. I tried setting that as a text field but it didn’t fix the issue.

    If I change to order by field in WPSP List settings then the order will change, so it appears that when a Custom Taxonomy is being used, the ‘settings’ part of the shortcode is being ignored.

    Any ideas?

    Thanks,
    Ben

    in reply to: Order by Custom Field #5239
    Ben
    Participant

    Hi Tom,

    It works! Once again you’ve come to the rescue – thanks so much, your help is really appreciated.

    For anyone else looking to do the same thing, here is the shortcode I ended up with. Needed to add the meta_key to the above code.

    Note the meta_key is the name of the Custom Field, in my case it was event_id.

    [wp_show_posts id=”16″ settings=”meta_key=event_id&orderby=meta_value&order=ASC”]

    Thanks again,

    Ben

    in reply to: Order by Custom Field #5237
    Ben
    Participant

    Hi Tom,

    Thanks – didn’t see you had posted this, will give it a try.

    Thanks,
    Ben

Viewing 15 posts - 1 through 15 (of 17 total)