I have a maze game in blender and to make the maze I subdivided a cube I flattened out and then selected some parts, extruded it, and raised it up. But, when I put in the texture, it didn't really work (see images). The walls were just lines. I really need to know how to fix that, even if it means that I don't see the texture the right way on the top. I just need the walls to look nice on the inside.
This can happen for several reasons, the most common being that you modified the mesh after initially adding the texture, hence the stretched look. A simple fix is to just unwrap the model again.
The fastest way to get a good result with a generic box model like that is to press U > Cube Projection or Smart UV Project depending on how tiled you want certain subdivided parts to look (can read more and experiment with the unwrapping types here).
Extrusions after adding texture
Extrusions after correcting using cube projection unwrapping
Extrusions after correcting using smart uv project
For anyone having problems with the unwrapping, this worked for me too:
Edit Mode > Options > Correct Face Attributes > then extrude
That's just how texture mapping works.
There's a square texture map, and then there's geometry coming off of it with no kind of seams to govern how it's lined up with the texture. It's taking the pixels on the edge and stretching them out infinitely because sides occupy literally no space.
I'm sure you've figured this out years later, but for anyone else looking this is essentially what's happening.