Adding more digital ports

for a school project I am making a robot using a Arduino UNO. For this project I need more ports then there are available on the Arduino, does anyone have any ideas of how I can create more I/O ports? I already came uppon shift registers, but with those I will not be able to store the date coming in right?

As example I am using a line detecting senor, which is using 5 ports, but if I use a shift register, I wont be able to store the values of the senor anymore right?

google "Arduino Digital I/O Expansion"

here is one hit with lots of ideas ➜

No, that doesn't make sense. If you can read the data, you have the data and can store it. You can use shift registers for either input or output. However:

Look at the MCP23017 port expander.
How to Connect an MCP23017 I/O Port Expander to an Arduino