I have multiple galleries, need to have separate popups for each image

You have access to my site (yodelinghalloffame.com). I will have many different galleries on my site and I've created a popup for each image to show details of that image. I've got a few set up to work right. See Yodelers Today page. But when I create another gallery (see Yodelers Past page) it links to the same popup as the first gallery because of the CSS selectors I'm using. How can I get popups to link to the proper popup for all of the different galleries.

Or, is there better way to do this? What I want is a small "web page" to pop up for each yodeler instead of a larger photo. I want to be able to create links on the page. If you take a look at the first few popups on the Yodelers Today page you'll see what I mean. I was thinking a popup with a standard format would be the best option but maybe not. All suggestions are appreciated!
Thanks!
Terry

  • Tyler Postle

    Hey Terry,

    Hope you're doing well today!

    You could still do this with Popup but you would need to change all the popup selectors for your first page to include .page-id-10 before the selector you have there. As I have done with Janet McBride. This way the selector is specific to that page only.

    Then when you add your new selectors for the next page you will want to do the same thing with that page's id :slight_smile: you can find the ID in the body class tag or just by looking at the url of the edit page screen. There will be a post="##" the number there is the id.

    Your "past yodellers" id=13 - so you would make sure the selector is .page-id-13 before the actual image selector.

    Let us know if you have any further questions!

    All the best,
    Tyler

  • Tyler Postle

    Hey Terry,

    If you had multiple galleries on the same page then you would likely need a new selector. I don't think the gallery number would continue on. Although, each gallery probably does have a unique selector we could use. So if you do end up doing that and need help finding a selector to use just let me know and I can have a look :slight_smile: Make sure you re-activate access too so I can get passed the coming soon page.

    Cheers,
    Tyler

  • Terry

    Hi Tyler,
    I do want to add multiple galleries on each page. I intend to have promo stuff in between them as you scroll down. Having said that I put another gallery on the "Yodelers Today" page. And the it does popup the same #1 popup as the gallery that's already there. I didn't have any luck find the selector I would use for the new gallery. It's wasn't as obvious as the page selector. If you could point me in the right direction and show how that would look in the CSS selector field for the popup, I sure will appreciate it and then we can close this topic. You have access to the site.
    Thanks!
    Terry

  • Tyler Postle

    Hey Terry,

    It looks like this is the selector you would want to use for the 2nd gallery there:

    .page-id-10 #ugallery-object-1447530484981-1406

    Then add the image selector after it.

    You will want to add this selector to all of your first gallery images too:

    #ugallery-object-1445027737473-1543

    After the page id selector and before the final image selector. This way it won't trigger those first gallery images on other galleries.

    Hope that helps!

    Cheers,
    Tyler

  • Hoang Ngo

    Hi @Terry,

    I hope you are well today.

    Please add this code to your theme functions.php or use mu-plugins

    add_action( 'admin_footer', 'remove_id_length_limit' );
    function remove_id_length_limit() {
    	?>
    	<script type="text/javascript">
    		jQuery(function ($) {
    			$('input[name="po_display_data[anchor]"]').removeAttr('maxlength')
    		})
    	</script>
    	<?php
    }

    This will remove the length limit, let's see if this can help :slight_smile:

    Best regards,
    Hoang

  • Tyler Postle

    Hey Terry,

    No problem! I've just made it into a php file so you can just upload it to:

    /wp-content/mu-plugins/

    If the mu-plugins folder doesn't exist yet then just create it there :slight_smile: once it's there, unzip my attached folder and upload the remove-id-length-limit.php file into the mu-plugins folder.

    It will be automatically activated and then check to see if it works.

    If you're still having trouble adding it, then you can send your FTP credentials into me and I can upload it for you.

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:

    Subject: "Attn: Tyler Postle"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    **If you keep support access active then no need to send in wp-admin

    Look forward to hearing back!

    Cheers,
    Tyler

  • Terry

    Hi Tyler,
    I got brave and here's what I did. I'm using Aptana Studio for my HTML and CSS lessons so I made a PHP of the code in that app. I just copied what was shown in Hoang's post. I put the file into the mu-plugins folder (image attached to be sure you think that is the right folder. The image doesn't show the php file because I had removed it already). Just loose and did not add it to any of the other folders. When I went to my site in WP I got an error message saying the syntax of the code was wrong and the page wouldn't open. I double checked the code on an on-lline site and it's saying the curly brace at the end is wrong. I tried deleting it but Aptana still tells me the syntax is wrong. I also included the PHP file I made in case you might find I did something wrong.
    Let me know what you think.
    Thanks!
    Terry

  • Tyler Postle

    Sorry Terry! Totally forgot to attach it :slight_frown:

    It looks like in that screenshot that your mu-plugins folder is within your languages folder?

    Make sure that it's only inside the wp-content folder so the path should be: /wp-content/mu-plugins/

    Then unzip the attached folder, it's really attached this time! (lol) and upload the file within it.

    Any further questions just let us know.

    Cheers,
    Tyler

  • Terry

    Hi Tyler,
    The mu-plugins folder is in the wp-content folder along with the lanquages folder and a bunch of others. I placed your file inside the mu-plugins folder as shown in attached image. It did not cause an error like mine did (i can see from your file where I went wrong on mine) but it didn't allow the extra space in the popup css selector field either. Still can add only up to 50 characters. Any other thoughts on this? You have site access if you need it.
    I'll come up with a "plan B" if this ends up becoming too complex.
    Thanks, as always!
    Terry

  • Tyler Postle

    Hey Terry,

    Very odd. I tested this out on my site and it's working correctly. The limit is removed.

    Could you send in your FTP info so I can investigate further?

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me.

    Send in:

    Subject: "Attn: Tyler Postle"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    **If you keep support access active then no need to send in wp-admin

    Look forward to hearing back!

    Cheers,
    Tyler

  • Tyler Postle

    Hey Terry,

    Thanks for sending this in. You're right, it's actually not working properly, I forgot that I edited one of the core files to increase my limit to 100 which is why I thought it worked. Sorry about that.

    The reason you won't want to edit it from the core file like I did is that it would get overwritten on updates then you would be back to 50 limit again.

    I'm going to message Hoang about this and see if we can come up with a new solution :slight_smile:

    Hope you're having a good weekend.

    Cheers,
    Tyler

  • Terry

    Hi Tyler,
    I am having a great weekend, thanks!
    I hope you are also, even though you are answering posts. I appreciate you checking out the css field. The reason I want multiple galleries on one page is that I want to put regions in between them with promo offers. So as the visitor scrolls down there's an opportunity for them to buy something every once in a while. As for "editing from the core file", well, that's just scares me. I don't even know what that means { : \ You're too kind to put up with my naiveté regarding making websites. But, I'm sort of like your poster boy (or, "poster old man") for someone who wants an easy, drag and drop website builder, but I want it my way and keep pestering you to change it all. Ha!
    If I can't get away with multiple galleries, I'll come up with something else. I'll wait for your further comments. I sure am grateful for your help!

    Thanks!
    Terry

  • Tyler Postle

    :smiley: haha no problem, thanks for all your patience Terry. We have quite a few major projects that are nearing deadlines which is why this is taking a little longer than usual. Developers are busier. You will be happy to hear that one of those projects is Upfront 1.0 though :slight_smile:

    As for "editing from the core file", well, that's just scares me. I don't even know what that means { : \

    The main issue with editing a core file is that the changes will be overwritten on updates and having to constantly re-edit a file after each update isn't very ideal, especially since updates may change part of the file and the edit might no longer work.

    Cheers,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.