• Resolved AskTheStuff

    (@askthestuff)


    Okay, this question has been asked, but nothing up to date. Also, none of the posts are correct for current wordpress version. So I am asking again.

    How do I find the image ID?

    i.e. here is the code on the page:
    [vc_row][vc_column][vc_gallery type=”image_grid” images=”275,267,192″][/vc_column][/vc_row]

    I have hundreds to add and the visual composer (very easy to use) only lets me add one image at a time.

    There has to be a way to see/view all Image ID’s so I can simply add (1,2,3,4,5,…) to the code above.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • neotechnomad

    (@neotechnomad)

    Place this at the bottom of your (preferrably Child Theme) theme’s functions.php with no spaces below it…

    function column_id($columns) {
        $columns['colID'] = __('ID');
        return $columns;
    }
    add_filter( 'manage_media_columns', 'column_id' );
    function column_id_row($columnName, $columnID){
        if($columnName == 'colID'){
           echo $columnID;
        }
    }
    add_filter( 'manage_media_custom_column', 'column_id_row', 10, 2 );

    …it creates a new column in the Media Library for image IDs.
    (…tested on my dev site – works as described)

    from here: Half-Elf on Tech : WordPress Media Library: Show ID

    Great! solved my immediate problem…one of em anyway…(:-}

    Still have two CSS problems…I believe.
    How do I get rid of borders/padding/margin around images in widgets?
    see heading on pages https://wp.nationalelectronicsmuseum.org

    Above was the first of two…
    second is a bar/space between main menu bar and widget bar on top

    Try using the custom CSS function of your theme (if there is one)
    Else you could add in your style.css

    img.alignleft {
        margin: 0;
    }

    I suggest using margin because now it looks very strange.
    You could easily add margin:5px; or 10px…
    This will move margin from the image on the left at your homepage.

    Use the inspector tool from firefox or chrome to identify your CSS classes and id’s.

    I hope this will help you…

    On your latest question I don’t realy understand what you mean with widget bar on top… and space between your menu?

    Thanks Djenci Duquene for such quick response.

    no….tried placing at end of Misc group in Custom:Stylesheet (style.css)also end of “Widget Specific Styling”…no change.
    Actually…don’t want home page to change…but template for all pages don’t render as I wanted…may be an issue with SB Easy Image??…I only wanted to eliminate border around images in top widget bar (right) where randomly selected (3) images show.

    Second issue:on home page menu renders as desired. On pages after that, menu appears twice as high…top 4 objects are widget bat …right 3 randomly selected. menu appears twice as high because of a space between (top) widget bar and menu.
    I haven’t found anything in style.css that eliminates this space.

    I screwed something up…second issue above: padding/border/margin
    between menu and heading images still there see(https://wp.nationalelectronicsmuseum.org).

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How do I find the image ID?’ is closed to new replies.