Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for an interesting question.

    You wrote “I can set a parent to a Page or Post but not another attachment page?” It looks like your statement is based on the list of posts/pages displayed in the “Select Parent” popup window MLA provides. In fact, you can set the parent to anything you like by entering the ID value, e.g., 3715 in your example, manually in the text box provided in the Quick Edit, Bulk Edit and full-screen Edit Media areas. I ran a quick test on my system and “attaching” one item to another did not cause any immediate errors.

    I have no idea how WordPress will handle a “parent” attachment, but if you can find a way to use that technique in your application you are welcome to try it out. You can find the attachment’s ID value in the ID/Parent column in the Media/Assistant admin submenu table.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.

    Thread Starter ratamatcat

    (@ratamatcat)

    Thanks David, worked great. Off to a flying start!

    I want to ‘nest’ additional images within other images. The additional images will be found by a user only from inside or within the initial (parent) image attachment page where they can link to them. They will not be shown in a main gallery page (so the main gallery/ies are not bombarded with similar variations of the first image theme). The user continues down the line of the first image, deep instead of wide.

    Parent:
    https://www.imjexa.com/madman-crane-levers-01/
    Nested:
    https://www.imjexa.com/madman-crane-levers-01/addl-01-madman-crane-levers-01/

    Both attachment page examples above will have its own MLA Gallery with a max of 20 or so images for the gallery. So when I max out I will spill more versions onto the additional page. I thought if you have too many gallery thumbnails it becomes hard to see on the phone. Besides that, an additional page can also mark a step change in the theme of the image itself; still similar but changing things up.

    Only ‘01’ attachment page will have the gallery and is seen by user. But there will be up to 20 uploads

    I suppose time will tell whether my approach here is sound or silly.

    Thread Starter ratamatcat

    (@ratamatcat)

    hi David,

    I have changed to a new theme that I want but unfortunately this has stopped working.

    When I ‘View’ an image from media library assistant it goes to the correct URL if the image is attached to a Page. But if the image is attached to another image it tries to find its URL:

    https://www.mydomain.com/?attachment_id=3459
    … and then redirects to the parent URL shortly afterwards
    https://www.mydomain.com/test-1/madman-crane-levers-01/

    And when I view the image from media library the URL is:

    https://www.mydomain.com/test-1/madman-crane-levers-01/#main/addl-01-madman-crane-levers-01/#main

    (test-1 is a Page the first image is attached to)

    in the default WP theme when I view the image from media library assistant or from from media library the URL is:

    https://www.mydomain.com/test-1/madman-crane-levers-01/addl-01-madman-crane-levers-01/

    The #main seems to be interfering. I tried with the following code removed from my attachment.php template to no avail:

    id="main"

    generate_do_element_classes( 'main' )

    do_action( 'generate_before_main_content' );

    It’s worth noting that if I type in the URL into a browser manually it works in the new theme:

    https://www.mydomain.com/test-1/madman-crane-levers-01/addl-01-madman-crane-levers-01/

    I have asked the theme provider about this a lot but they are not very helpful. This works in all the default WordPress themes and another third party theme I tried as well but not this theme that I want.

    thanks,

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and for the details you’ve provided. As I posted earlier, I have no idea how WordPress would handle “attachment” parents and I guess this applies to some themes as well.

    Without access to the theme you’re evaluating I have no way of reproducing the problem or investigating further. I’m sorry to hear the theme provider has not been helpful, but they are in the best position to know what’s going on, given that everything works in the default WordPress themes and other third-party themes.

    I am traveling next week but if you can tell me how to get a copy of the theme I can have a look at it after I return home. Thanks for your understanding.

    Thread Starter ratamatcat

    (@ratamatcat)

    Hi David,

    Thanks for the generous offer to check it out for me. Well an update on this is I was able to get the theme provider to look at it again and they sent me this function which did the trick:

    add_action( 'after_setup_theme', function() {
        remove_filter( 'attachment_link', 'generate_enhanced_image_navigation', 10, 2 );
    } );

    I hope you enjoy your travels while I enjoy this great plugin

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news. I am happy to see that the theme vendor came through for you.

    I am leaving this topic resolved, but please post an update if you have anything further to report or ask.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Set a Parent to another attachment page’ is closed to new replies.