fourlightsweb
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Gallery Custom Links] Links not workingDoing a view source on the page indicates that the custom links are being set – but somehow the links are being modified with javascript by something else after that point. My suggestion would be to disable your plugins and re-enable one-by-one until you find the one that’s causing that to happen.
Forum: Plugins
In reply to: [WP Gallery Custom Links] Links not workingCan you try re-enabling it now? The onclick seems to have disappeared – did you disable any other plugins or just this one?
Forum: Plugins
In reply to: [WP Gallery Custom Links] Links not workingActually, if you do a view source on your page, your gallery image has the following:
<a href="http://www.therisingspoon.com/2013/03/how-to-make-homemade-meat-stock.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://www.therisingspoon.com']);" target="_blank" class="set-target no-lightbox"><img width="150" height="150" src="http://www.oursmallhours.com/wp-content/uploads/2014/01/155-150x150.jpg" class="attachment-thumbnail" alt="How To Make Homemade Meat Stock" /></a>But looking at it with “Inspect Element” I see the following:
<a class="set-target no-lightbox" target="_blank" href="http://www.oursmallhours.com/wp-content/uploads/2014/01/155.jpg" rel="cyberchimps-lightbox" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://www.therisingspoon.com']);"> <img class="attachment-thumbnail" height="150" width="150" alt="How To Make Homemade Meat Stock" src="http://www.oursmallhours.com/wp-content/uploads/2014/01/155-150x150.jpg"></img> </a>Assuming “http://www.therisingspoon.com/2013/03/how-to-make-homemade-meat-stock.html” is your custom link, it looks like you have something modifying the links post-page-load via javascript. When I disable javascript, reload, and view the source, the html link is still there. It looks like you have a conflict with another plugin, would be my guess.
Forum: Plugins
In reply to: [WP Gallery Custom Links] Links not workingI noticed in your source that your gallery image links have the following:
onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://www.therisingspoon.com']);"Do you have a particular plugin that’s adding that onclick event, or how are those getting on there?
Forum: Plugins
In reply to: [WP Gallery Custom Links] Links not working3.8.1 was just a maintenance release, and it appears to be working fine with WP Gallery Custom Links on my test site. Do you have a link to your gallery that’s not working, and have you made any other changes recently aside from updating to 3.8.1?
Forum: Plugins
In reply to: [WP Gallery Custom Links] Load TimeWP Gallery Custom Links does use regular expressions to do the matching for finding the links to be replaced, which can be a bit expensive. But unfortunately I’m not sure there’s a different way to approach the problem (I’m open to possible suggestions). I have gone through in the past and tried to reduce the number of regexes in the code to improve performance, but I’ll keep an eye open for other possible optimizations when I make updates in the future. Sorry =\
Forum: Plugins
In reply to: [WP Gallery Custom Links] Conflict with simple modal loginDoes that gallery item have “Gallery Link OnClick Effect” set to “Remove”? Usually onclick effects are things like lightboxes, but in your case it sounds like you’d want to keep them, since the other plugin looks like it’s applying an onclick event to popup the modal.
I created a test gallery with the SimpleModal Login plugin, plus some javascript to add the simplemodal login class to one of the image links:
http://wp1.dev.fourlightsweb-3.com/lisas-test-gallery-page/
and my page source looks like the following:
[gallery ids="32,31,30,29"] <script> jQuery('#gallery-2 a[href$="http://www.yahoo.com"]').addClass('simplemodal-login'); </script> <a class="simplemodal-login" href="/wp-login.php?redirect_to=http://www.yahoo.com">Normal Link Test</a>On that first image, I made the custom link “/wp-login.php?redirect_to=http://www.yahoo.com” then changed the WP Gallery Custom Links setting for onclick events from the default of “Remove” to “Keep”, and it appears to be working the way you’d like. If this is the solution you’re looking for, you can use the following attribute on the gallery shortcode to change that onclick setting for the entire gallery:
[gallery preserve_click_events="true"]Note that according to the other plugin’s documentation, your custom links will need to link to the wp-login.php page for your site, with the URL you want to redirect to at the end, similar to this:
/wp-login.php?redirect_to=http://www.yahoo.comForum: Plugins
In reply to: [WP Gallery Custom Links] Caption LinkI’m not sure what version of WordPress you’re using, but in one of the more recent versions they added to core the ability to add markup to captions. I think you should just be able to put a normal link around your caption text and it should work:
<a href="http://somelink.com">Caption Text</a>Forum: Plugins
In reply to: [WP Gallery Custom Links] Conflict with simple modal loginHm, I’ll look into it, thanks.
Forum: Plugins
In reply to: [WP Gallery Custom Links] where did the blog post permalinks go?This plugin doesn’t actually generate any links or change permalinks in any way – it only uses links that people have manually entered, and doesn’t overwrite anything that WordPress does automatically to the extent that it remains if the plugin is disabled/removed. It sounds like your problem lies with another plugin or core, sorry. =\
You might want to review the requirements for pretty permalinks and make sure everything is set up that needs to be (mod_rewrite, htaccess, etc.):
http://codex.wordpress.org/Using_Permalinks
I noticed it also mentions not to use your domain when specifying the format, so if you’re doing that you may want to take it out.
Here is an example of what I described above, but using all WP galleries (no NextGen galleries):
http://fourlightsweb.dev.fourlightsweb-3.com/gallery-test-parent/
“Gallery Test Parent” is a page that has a WP Gallery on it. Each of the 2 images has a custom link entered manually by me by typing in a page URL into the “Gallery Link URL” field created by WP Gallery Custom Links, as seen in the screenshot above. These custom links link to the Gallery Test Child 1 and Gallery Test Child 2 pages, respectively. Each of the child pages contains its own standard WP gallery with no custom links (all images go to the attachment pages).
get_post_meta() was not used at all in this example, and no changes were made at a code level – it was all done using pages, galleries, and entering custom links when editing a gallery with the standard UI.
Ah okay, so you would have Page A that uses a normal WordPress gallery with WP Gallery Custom Links so each image in that gallery would link to Pages B, C, D, etc., and then Page B displays a particular NextGen gallery, Page C displays a different NextGen gallery, etc.? That sounds like it should work fine. 🙂
If you’re just trying to get the URL of an uploaded image, WordPress has built-in functions for that (e.g. http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src), or you can copy and paste the value from the media library if you’re looking to get the URL manually. WP Gallery Custom Links allows you to replace the automatically generated URLs with custom URLs in a gallery. If this is not your end goal, you probably don’t need this plugin.
In terms of using WP Gallery Custom Links, maybe this user-made video will help:
If you’re using a WordPress core gallery by itself, or with the Jetpack plugin, all you should need to do is enter a custom link for each image like in the screenshot I linked above, and it should automatically swap in that custom link when the gallery is displayed – no changes at the code level required (assuming your theme is compatible).
Getting the custom url with get_post_meta() is only provided as an example for designers and developers that are coding/customizing their own galleries and want to pull that information out of the database – this is not something you’d need to do to simply use the plugin.
The NextGen gallery plugin is completely and entirely separate from the WordPress core gallery shortcode and Jetpack, and is not compatible with WP Gallery Custom Links. If you’re using NextGen for your galleries, you’d need to consult their forum for support.
Please see the screenshot for where to enter your custom links:
http://s.w.org/plugins/wp-gallery-custom-links/screenshot-1.png?r=832372
You shouldn’t need to edit code for the plugin to work with Jetpack unless something’s wrong or missing somewhere, and you shouldn’t need that code snippet unless you’re coding your own gallery layout.
WP Gallery Custom Links should work with Jetpack without having to make changes, except maybe some settings. Do you have a link to the gallery that’s not working properly, can you tell me what value(s) you have for Gallery Link URL, Gallery Link Target, and Gallery Link OnClick Effect on the problematic image(s), and can you describe what you’re expecting to happen that’s not?