Title: Remove image number
Last modified: April 11, 2020

---

# Remove image number

 *  Resolved [jenpen25](https://wordpress.org/support/users/jenpen25/)
 * (@jenpen25)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/remove-image-number/)
 * Hey, excellent plug-in and super-easy. Referring to a previous question about
   removing “Image” from the captions ([https://wordpress.org/support/topic/image-in-front-of-title-and-number-on-fancybox-overlay/](https://wordpress.org/support/topic/image-in-front-of-title-and-number-on-fancybox-overlay/))
   I would like to remove the image numbers too, eg 1/13. Is there some custom CSS
   for this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fremove-image-number%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [cleoni](https://wordpress.org/support/users/cleoni/)
 * (@cleoni)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/remove-image-number/#post-12662261)
 * Actually you cannot do it with CSS.
 * A quick fix would be to edit the file lightbox.php, lines 144-148 from this:
 *     ```
       $gall .= '
       		,
       		"titleFormat"		: function(title, currentArray, currentIndex, currentOpts) {
       			return "<span id=\'fancybox-title-over\'><span id=\'fancybox-title-pretext\'>'.__('Image','simplest-gallery').' </span>"+(currentIndex+1)+" / " + currentArray.length + (title.length ? " &nbsp; " + title : "") + "</span>";
       		}';
       ```
   
 * to this:
 *     ```
       		$gall .= '
       		,
       		"titleFormat"		: function(title, currentArray, currentIndex, currentOpts) {
       			return "<span id=\'fancybox-title-over\'><span id=\'fancybox-title-pretext\'>'.__('Image','simplest-gallery').' "+(currentIndex+1)+" / " + currentArray.length + (title.length ? " &nbsp; </span>" + title : "") + "</span>";
       		}';
       ```
   
 * (the first </span> tag has been moved a bit further in the line).
    It might be
   interesting to integrate this in the next release and removing the useless “Image”
   hidden text.
 * The above fix is untested, but it should work. Let me know if it worked for you.
 *  Plugin Author [cleoni](https://wordpress.org/support/users/cleoni/)
 * (@cleoni)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/remove-image-number/#post-12724598)
 * Assuming issue is fixed, I close this ticket.
 * If more help is needed, just open a new one.
 *  Thread Starter [jenpen25](https://wordpress.org/support/users/jenpen25/)
 * (@jenpen25)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/remove-image-number/#post-12727984)
 * cleoni, please remind me how to access lightbox.php.
 *  Plugin Author [cleoni](https://wordpress.org/support/users/cleoni/)
 * (@cleoni)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/remove-image-number/#post-12729579)
 * The safest way is to access your site’s files via FTP and you will find it into
   wp-content/plugins/simplest-gallery
 * There is also an editor in the backend (menu Plugin->Plugin editor, then select
   Simplest Gallery and that file).
 * Anyway please be advised that this requires a minimum of programming skills. 
   With PHP files it is sufficient to put a character in the wrong position and 
   your site might stop working (if it happens, use FTP to delete the plugin folder,
   then reinstall and redo).
 * Cheers
 *  Thread Starter [jenpen25](https://wordpress.org/support/users/jenpen25/)
 * (@jenpen25)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/remove-image-number/#post-12732187)
 * Thanks cleoni. You can close this now.
 *  Thread Starter [jenpen25](https://wordpress.org/support/users/jenpen25/)
 * (@jenpen25)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-image-number/#post-13031641)
 * cleoni thanks but this didn’t work. It didn’t remove the ‘Image x/x’ from the
   captions.
 *  Plugin Author [cleoni](https://wordpress.org/support/users/cleoni/)
 * (@cleoni)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-image-number/#post-13032822)
 * I see. Let me check it on my own site.
    I think this fix would be beneficial 
   to all for the next release. This image numbering is something which I would 
   get gladly rid of.
 *  Thread Starter [jenpen25](https://wordpress.org/support/users/jenpen25/)
 * (@jenpen25)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-image-number/#post-13036631)
 * Much appreciated.
 *  Plugin Author [cleoni](https://wordpress.org/support/users/cleoni/)
 * (@cleoni)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-image-number/#post-13037600)
 * Hello, I have made a change in order to remove image number where a title has
   been set for the image (it will however show “Image N / NN” if no title has been
   set).
 * The change will be incorporated in the next release but since I don’t know when
   it will happen, and since it’s possible that in your website the code of lightbox
   has been twekaed already, I recommend you apply this fix simply by changing the
   lines 147-149 from:
 *     ```
       		"titleFormat"		: function(title, currentArray, currentIndex, currentOpts) {
       			return "<span id=\'fancybox-title-over\'><span id=\'fancybox-title-pretext\'>'.__('Image','simplest-gallery').' </span>"+(currentIndex+1)+" / " + currentArray.length + (title.length ? " &nbsp; " + title : "") + "</span>";
       		}';
       ```
   
 * to this:
 *     ```
       		"titleFormat"		: function(title, currentArray, currentIndex, currentOpts) {
       			return "<span id=\'fancybox-title-over\'><span id=\'fancybox-title-pretext\'>" + (title.length ? title : ("'.__('Image','simplest-gallery').'" +(currentIndex+1)+" / "+currentArray.length) ) + "</span></span>";
       		}';
       ```
   
 * Apply this fix on the file **lightbox.php**.
    Save and then test.
 * If it works, and you don’t wont the “Image #” to appear _at all in any case_,
   even when there is no title for the image, you can further replace this part
 * `+ (title.length ? title : ("'.__('Image','simplest-gallery').'" +(currentIndex
   +1)+" / "+currentArray.length) ) +`
 * with this
 * `+ title +`
 * You can see the fix in action at this page: [https://vic20reloaded.com/vic-20-cartridge-games-collection-1a/](https://vic20reloaded.com/vic-20-cartridge-games-collection-1a/)
   
   as you can see “Image N / NN” before the title does not appear.
 * Hope it helps!
 *  Thread Starter [jenpen25](https://wordpress.org/support/users/jenpen25/)
 * (@jenpen25)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-image-number/#post-13041097)
 * Yes! Thanks, that’s exactly what I needed. 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

 The topic ‘Remove image number’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simplest-gallery_fcf1d1.svg)
 * [Simplest Gallery Plugin](https://wordpress.org/plugins/simplest-gallery/)
 * [Support Threads](https://wordpress.org/support/plugin/simplest-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/simplest-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simplest-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simplest-gallery/reviews/)

## Tags

 * [galleries](https://wordpress.org/support/topic-tag/galleries/)

 * 10 replies
 * 2 participants
 * Last reply from: [jenpen25](https://wordpress.org/support/users/jenpen25/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/remove-image-number/#post-13041097)
 * Status: resolved