• I am using the Pinboard theme – which is awesome! I used Tumblr Importer to bring in all of my old blog posts. I have been cleaning them up, which for the most part has been straight-forward, change tag to category, clean up titles, etc. My only problem is that all image posts from Tumblr loaded into WordPress as a Gallery, whether it was one image or many. I can fix the issue in the main (feed) view by simply changing the post type to “image” (so that the first image in the Gallery shows up at the preview of the post in the main feed), but this doesn’t help for:

    a) viewing the actual post
    b) utilizing the light-box option in my theme

    I have searched and searched for plugins or other ways to simply go in and tell WordPress that all images in a Gallery post should be set as linking to the media file, not the attachment page, so that the light-box function in my theme can do its job. I cannot find anything to take care of this simple task. I don’t expect to find anything to take all my single image Gallery posts and make them image posts instead – I can deal with my archive not being completely perfect. But if someone is visiting a post and clicks on the Gallery Thumbnail, I’d like the light-box preview to pop up with the full-res image. Not redirect to an attachment file that shows the image in a page of its own.

    I have tried the hack for images [go to the hidden file options.php and change the image view to "none"] (which works) but this only works if the post was originally set up with a single embedded image, not a gallery – even if the gallery only contains one image.

    I am not a hard-core coder. I know html, and how to write css, but that’s as far as my knowledge goes. If someone can just point me in the right direction, and tell me where I can look for the code that says “default display of gallery images should link to media file”, I would be entirely in your debt. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter loquos

    (@loquos)

    Oh, I meant to add – the only way I’ve found to fix the problem is to go into each individual post, click the “edit Gallery” button, then change the default “link to” to “media file”. But I have literally thousands of archived posts I would need to do this to, and I’m not sure I’m up for the tedium! Surely there is a better way??

    Moderator bcworkz

    (@bcworkz)

    Changing the “link to” parameter is an important discovery! That tells me there is a single value for each gallery in the database that needs to be changed. If you can determine what that is, a single well crafted UPDATE query in phpMyadmin would fix your problem. Unfortunately, crafting the proper query can be a challenge unless you’re familiar with mySQL. Be sure you have a good backup before trying anything like that!

    Depending what needs to be changed, it may be possible to do the same thing in PHP using WordPress functions to manipulate the database, which would be safer but slower. Speed is not an issue since it would only need to be executed once.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Gallery Settings "Link to" Default’ is closed to new replies.