Gallery in a Widget

  • Author
  • #890931



    I only first started blogging a month ago, but I’ve managed ok and am almost done.

    All the articles are on one page, with the clickable titles in the sidebar and under those I would like to put many small pictures going all the way down the sidebar to the bottom.

    I think it is possible with a gallery in a widget but strangely in spite of quite a bit of clicking around have not been able to find out how to put a gallery in a widget.

    I found this:

    “Highlighting photos from a Gallery in a Text widget using the shortcode and Post or Page ID number together with image “include”. Photos must appear in a published Gallery or visitors will get a 404 error if they click on a photo to view it. Does not work with the Slideshow feature.”

    Can anyone help?


    The blog I need help with is



    This is a link to an excellent resource on the Gallery. If you can’t find an answer there then I’m sorry I don’t have one for you.



    you can put a Gallery in a text widget in your blog’s sidebar using the Gallery ID in the shortcode. Since Gallery is tied to a Post or Page, you’d have to upload and insert the Gallery into a Post or Page first. Gallery in sidebar >



    Thank you, that’s fantastic.

    I’ll be back if I can’t work it out, before rather than after I’ve spent too many hours going around in circles.



    I’ve spent several hours on this (I am a bit slow!) but I’m stuck.

    I’ve managed to get the correct gallery in the post, but I can’t get the post or the gallery in the widget.

    I can’t seem to find the instructions to cover this.

    This is the shortcode:

    [gallery link="file" columns="1"]

    This is the shortcode with the URL for the post (I don’t think this is the correct way but it doesn’t work anyway.

    [gallery link="" columns="1"]

    I can’t seem to find another number to put in the shortcode at “file”.

    Sorry I am a bit dense but I’d be grateful for some help on this..




    If I put the post in the menu it shows the gallery fine, along with the gallery down in the sidebar as I wanted it.

    The problem is I don’t want the post in the menu, and when I take it out it also disappears from the sidebar,


    Are you not able to:
    create a gallery on a post or page
    then switch to the HTML editor and copy all of the code
    paste the code into a text widget and disaply it in your sidebar
    then delete the post or page?



    Apart from completely deleting the post, I did do that and it didn’t work.

    I’ve just done it again and it still doesn’t work.

    I think the code that is in the HTM is [gallery link="file" columns="1"] which doesn’t look right as there should be a number in the “file”?

    The gallery pics only showed up in the sidebar when I put the post in the menu, that is when its title appeared in the sidebar, that was the only time I got the gallery down in the sidebar where I wanted it, but I didn’t want the post at all, so when I deleted it, the gallery also disappeared from the sidebar.



    I’m sorry I can’t help you. Hopefully another Volunteer or Staff will be able to.



    Is it the post ID that I’m missing?

    I did get a four number code in the URL but putting that instead of file in “file” didn’t work either.



    1) This is a URL (a web address):
    I has nothing to do with the gallery shortcode. What’s more, it’s the URL of a dashboard page: you can never use such URLs anywhere, because others don’t have access to your dashboard.

    2) By default, when you click on a gallery thumbnail it links to the gallery carousel slideshow. If you want the thumbnail to link to the image file alone, you add this:
    The word file isn’t supposed to be replaced by anything else.

    3) To insert a gallery of images uploaded via the Add Media button of a certain post, you add this:

    So, to insert a single-column gallery of images uploaded to post no. 1147, you need this shortcode:
    [gallery id="1147" columns="1"]
    [gallery id="1147" link="file" columns="1"]



    Oh wow at last, it’s done. It was not easy!

    However I am really pleased with the result which is exactly what I wanted.

    I had wasted a lot of time resizing unnecessarily, so for anyone else the pics as long as suitably cropped can be different sizes, but the size they appear can be regulated in the Settings – Media – Thumbnail size 220 width 250 height.

    Thank you very much.



    You’re welcome.

    Yes, the thumbnail size is regulated in Settings > Media. Small suggestion: set the height to 0 so that it will have no effect (this way your image035 won’t show up narrower than the others).



    I tried that but it definitely didn’t work, so I’ve changed it back to 220W and 250H which works just about perfectly, whereas nothing else seems to.

    Thank you for your help.

The topic ‘Gallery in a Widget’ is closed to new replies.