I am facing error in the wordpress single page php coding

You have few issues with your code:

  1. You haven’t added php start code syntax properly at few places ( i.e. you should write <?php instead of <? ).
  2. You’ve to end endif loop with a Semicolon (;).
  3. You have to remove ““““ appearing at the end of the code.

By implementing these fixes, your existing errors will be fixed hopefully.