• I want to setup a WordPress IMAGE page that:

    1: Shows the 6 Images of the image-category ‘Start’:
    Choose 1 image:

    A B C D E F
    ??? ??? ??? ??? ??? ???
    ? ? ? ? ? ?

    2: shows now all the images of image-category ‘D’ because that is selected under 1:
    Choose 1 image:

    D1 D2 D3 D4 D5 D6
    ??? ??? ??? ??? ??? ???
    ? ? ? ? ? ?

    3: shows now all the images of the image-category ‘D2’ because that category is selected under 2:
    Choose one or more images:

    D2a D2b D2c D2d D2e D2f
    ??? ??? ??? ??? ??? ???
    ? ? ? ? ? ?

    4: shows now all the images of the image-categories ‘D2c, D2d and D2f’ because those Images are selected onder 3:
    Choose 1 image:

    D2c1 D2c2 D2c3 D2c4 D2c5 D2c6
    ??? ??? ??? ??? ??? ???
    ? ? ? ? ? ?

    D2d1 D2d2 D2d3 D2d4 D2d5 D2d6
    ??? ??? ??? ??? ??? ???
    ? ? ? ? ? ?

    D2f1 D2f2 D2f3 D2f4 D2f5 D2f6
    ??? ??? ??? ??? ??? ???
    ? ? ? ? ? ?

    At the end of the page -ONLY THE SELECTED Images- under step 1, 2, 3 and 4 must be exported to a PDF or Word document > as a THUMBNAIL with their filename when the user press a BUTTON.

    How can I setup this page? I already have the images and image-categories.
    Thank you in advance.

    • This topic was modified 3 years, 8 months ago by p_kemps.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Create a custom page template that incorporates the logic you want. To get it used for a specific page on your site, name the file using this format: "page-{$page_slug}.php"

    You need some JavaScript to handle user interaction. It can either reload the page after adding URL query vars indicating previous selections, or get relevant content via Ajax request, which then gets inserted into the page’s DOM.

    Thread Starter p_kemps

    (@p_kemps)

    Hi bcworkz, thanks for your reply. Is it possible to create a simple example for me? I’m not familiar with programming in php and Ajax.
    What is a page DOM? KR, Peter

    • This reply was modified 3 years, 7 months ago by p_kemps.
    • This reply was modified 3 years, 7 months ago by p_kemps.
    Moderator bcworkz

    (@bcworkz)

    DOM == Document Object Module, basically the structure of the HTML code that JavaScript operates on.

    For more on Ajax in WP, see https://developer.www.ads-software.com/plugins/javascript/ajax/

    Note that the examples are just that. It looks like you could assemble the snippets into working code, but they don’t all work together as-is, some modification would be needed. Each example is valid on it’s own, they don’t quite work as a whole.

    FWIW, Ajax is being somewhat replaced by REST API calls, but going that route is more to take on for a novice coder. In fact, even Ajax is a lot to take on. Unless such a user experience is really important, you’ll have an easier time reloading the page for each step and having code behave differently based on where the user is in the process.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image Query and export to Word/PDF file’ is closed to new replies.