Sign in

How to add new slides to slider from admin panel

  • This topic has 3 replies, 2 voices, and was last updated 2 years, 8 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5000
    Avatar photoYaroslav

    Hello friends and developers! I started to discover your great product – publii. I think it will have great future and I will be glad to use this product. I am new one here. I tried to find the answer in developers doc and on forum but didn’t find, so I am asking for help!

    How to add new slides to slider from admin panel? I want to add a code with slider. It will work, I know it. Then I want to give the admin of
    the site the possibility to add photos in this slider without direct code adding, just from admin panel from special field.

    Will be glad to recieve your answers and advices!

    You are doing great work!

    #5010
    Avatar photoTomasz Dziuda

    Hi,

    At this moment one of the easiest ways to create slider is create set of hidden posts and use them as a source for generating slides in the website (you use then featured posts as a slide image). You can also mark them by one tag and the use getPostsByTags to find these posts.

    Alternatively you can use image options to specify slider images as a theme options. But then you have to specify options for all slides even if they will be unused (e.g. you must prepare options for 8 slides, when 3 will be used usually).

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5011
    Avatar photoTomasz Dziuda

    If I remember the first variant has been used in the Portfolio theme: https://marketplace.getpublii.com/themes/portfolio/

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5016
    Avatar photoYaroslav
    Tomasz Dziuda wrote:

    Hi,

    At this moment one of the easiest ways to create slider is create set of hidden posts and use them as a source for generating slides in the website (you use then featured posts as a slide image). You can also mark them by one tag and the use getPostsByTags to find these posts.

    Alternatively you can use image options to specify slider images as a theme options. But then you have to specify options for all slides even if they will be unused (e.g. you must prepare options for 8 slides, when 3 will be used usually).

    I understood you good,  Tomasz! Thank you for such fast answer and thank you for help. I was thinking on the second variant with theme options but you finished my idea and I will try this way. I will aslo check the first idea and will look how it is working in Portfolio theme from the code side. Once again, thank you so much!

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