Skip to content

u/ladycodemonkey

In this archive from Oct 2015 to Sep 2025

13
posts
112
comments
0
media
215
score

Top posts

The easy way to assign a custom single.php template to a category and all of its children

I was beating my head against a wall trying to figure this one out. I started out with the standard in_category method - IF in_category(x) then use this template ELSE if in_category(y) use this other template ELSE use the default template. You know the one. The problem is that I'm dealing with a fai...

4 points1 comments
Open on Reddit

Random 500 server error - HELP!

So I a weird issue happening and I have been practically tearing my hair out trying to figure out the cause. When I pull up a client's website, it will randomly throw out a 500 server error but when I refresh my browser, it loads fine. This is what I see in the error log: "Warning: Invalid argument...

2 points5 comments
Open on Reddit

Top comments

If you use a fluid grid system for the portfolio and have each thumbnail open to a larger view in a lightbox, that would work.

Even an inline (horizontal) list that wraps would work, like this:

<ul class="portfolio">  
<li>[thumb1]</li>  
<li>[thumb2]</li>
<li>[thumb3]</li>
<li>[thumb4]</li>  
<li>[thumb5]</li>  
<li>[thumb6]</li>
...etc...  
</ul>  

In your CSS, you would style it something like this:

.portfolio { margin-left:0 ;  
padding-left:0 ;  
list-style-type:none ;  
}  
  
.portfolio li { display:inline-block ;  
-webkit-box-sizing: border-box;  
-moz-box-sizing: border-box;  
box-sizing: border-box;  
margin-right:-4px /* this gets rid of the funky space that inline-block can sometimes force */  
padding:12px ;  
width:25% /* this gives you a 4-across grid on desktop */
}  
  
.portfolio li img { display:block }

And then in your media queries you can set new widths for the <li>:

For tablet in portrait view (landscape should still be able to use desktop <li> widths):

@media only screen and (max-width: 768px) {
.portfolio li { width:33.3333% /* gives a 3-across grid */ ;  
}  
}  

And for smartphones (landscape):

@media only screen and (max-width: 480px) {
.portfolio li { width:50% /* gives a 2-across grid */ ;  
}  
} 

And for smartphones (portrait):

@media only screen and (max-width: 320px) {
.portfolio li { width:100% /* gives a single column grid */ ;  
}  
} 

Hope that helps!

4 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.