I've made some plugins to print some text with php from the database. I use them in pages via shortcodes. If I put all the code in only one folder, so just one plugin, only one shortcode works,the one in the file with the same name of the plugin. How can I put all files in only one folder and have all shortcodes working?
Choose one file to be the main file of the plugin. From it, use
require_once( plugin_dir_path( __FILE__ ) . 'another-file.php' );
for each of the other files you want to include.
This means the rest of the files no longer need the plugin comment header, just the actual code that does whatever you need it to.