How can I add an application to the Favorites section of the Applications menu in CentOS 7?

The favourite in Gnome Classic view follows the favourites in the Gnome 3 shell.

Click on Activities in the top-left corner or use your keyboard's Windows button if it has one, to bring up the activities overview. Right-click on one of those activities and Add to Favourites.

It should now be visible in the Gnome Classic Favourite menu.

No need to edit files.

Sometimes you can't just add the application's launcher to the activity menu because it isn't recognized as an activity.

go to the folder containing the .desktop file you wish to add to the favorites bar and open the terminal there. run the command sudo mv path/to/file/name.desktop /usr/share/applications

after that you should be able to view the launcher in the activities list and easily add it to the favorite menu :)