Title: Gallery Category Loop Function
Last modified: August 19, 2016

---

# Gallery Category Loop Function

 *  Resolved [neil-guevara](https://wordpress.org/support/users/neil-guevara/)
 * (@neil-guevara)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/gallery-category-loop-function/)
 * Hey guys, wondering if i can get some help. Im trying to add galleries to my 
   wordpress blog using the category function. That is when you add the relevant
   CSS/PHP to the loop in your index file you can insert all galleries under the
   category “gallery” that you create. An example of this can be seen on matt’s 
   page.
 * Heres what matt said about it :
 * > I put the intro text, and then the more page split, and the gallery shortcode
   > after that. Here’s the snippet of my index template that does asides and the
   > gallery posts:
   > [http://php.pastebin.com/m5d433a57](http://php.pastebin.com/m5d433a57)
   > Obviously the category IDs need to match whatever you’re using. It’s the same
   > technique I wrote about a few years ago for asides:
   > [http://ma.tt/2004/05/asides/](http://ma.tt/2004/05/asides/)
   > I hope that helps! I’ll write more on my blog about this at some point.
 * The problem is i cant get the code to work on my index.php file and im wondering
   if there is some wicked php’er out there that could help me.
 * Matt sent me the [snippet of the code from his index](http://php.pastebin.com/m5d433a57)
   file so im hoping that someone knows how to add it to [my index file](http://php.pastebin.com/f5ee4c0ef)
   to get it to work.
 * Thanx everyone for taking the time.

The topic ‘Gallery Category Loop Function’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [gallery](https://wordpress.org/support/topic-tag/gallery/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [index.php](https://wordpress.org/support/topic-tag/index-php/)
 * [Pictures](https://wordpress.org/support/topic-tag/pictures/)

 * 0 replies
 * 1 participant
 * Last reply from: [neil-guevara](https://wordpress.org/support/users/neil-guevara/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/gallery-category-loop-function/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
