Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

WP Query’s in GP Elements

  • Hello support team,

    I have a question : Since WP show posts will stop in the near future, I want to use WP query’s via the theme’s Elements ( Hooks ) so I can uninstall WPSP after a while.
    Currently I have +/- 35 different categories on my website, and for each one I need to make about 9 different hooks ( 300+ hooks )

    Each category needs : newest/oldest/most comments/less comments/best rated/worst rated/most hits/less hits and random post per category. The readers on our website want options, and lots of them 🙂

    Besides it works great via Hooks and is a lot of work, my question is :
    Is it okay to use so many hooks, or is there a better way to do this ? I don’t want to find out after making all these that this is not the best way to go and do it all over again.

    I prefer to use as little plugins as possible.

    Looking forward to your reply,
    Best Regards,
    Gert

  • Hi there,

    it would be better if it could be done dynamically, so if each archive has the same layout and content just differentiated by category term then it would make more sense to template this.

    How are these pages currently created ? Is it possible to see them ?

  • Hello David,

    Thank you for your reply.

    Layout is for all pages the same yes.
    What would you like to see ? The code which is used, or the layout for the pages ?
    Since the content is x-rated ( text only) I would prefer not to post it publicly. Is there another way to show you David ?

    Best regards,
    Gert

  • I just need to see one of the pages you want to rebuild.
    You can share the URL to it in the Private Information field. Only the GP Admins can see that.

  • Thanks David, I shared some pages in the private section.

  • it would be better if it could be done dynamically, so if each archive has the same layout and content just differentiated by category term then it would make more sense to template this.

    Do you mean a customized archive template that contains all the necessary conditions?

    Like Gert I am a big fan of WP Show Posts. Since I don’t like Gutenberg, it’s a huge loss that the plugin is retired. But I understand your point of view, of course.

  • OK, so i don’t see any real issues with the number of hooks, but what are the 9 hooks per category for ?

  • Hi David, thanks for checking!

    9 hooks per category :
    Each category needs : newest/oldest/most comments/less comments/best rated/worst rated/most hits/less hits and random post per category

    If you see no problems in making so many hooks, I’ll just go ahead and start working 🙂

    Best regards,
    Gert

  • Hi Gert,

    I think it’s fine, it might slow down the page a bit, but should not be a major issue.

  • Thank you David and Ying for your time and support!

  • You are welcome   🙂

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