Is there a way I can get pages instead of posts using the layers post widget?

Asked on August 6, 2015 in Customization.
Answered

Hello,

Is there a way I can get pages more specifically other layers pages instead of posts using the layers post widget?

What changes would i have to make to the plugin to make this happen?

Been working on trying to figure it out and could use any help/direction I can get.

Thanks,
G

Reply
  • Possible Answers to Your Question:

  • 1 Answer(s)
    Answered on August 24, 2015. Best answer

    Hi there,

    Unfortunately not, as posts and page objects are very different in WordPress. The posts widget is coded specifically to query against the post type and a post category. If you create a custom extension, you can convert the post widget to a page widget by removing the category and pagination options, and changing the query type to ‘page’. I wouldn’t be able to walk you through a complete conversion in detail, but recommend checking out our developer documentation on creating custom widgets. Modifying the existing layers core is not advisable at all, since you will lose changes in every theme update.

    I recommend using the Content widget to setup page links – it takes far less time.

    Vail Joy Layers Team
    Reply