Preheat oven to 350º F. Prepare 9x13 baking pan with nonstick baking spray or by lightly buttering and flouring.
Cream together butter, sugar, and vanilla until creamy with an electric mixer. Add eggs one at a time, beating well after each addition. Add flour and salt, mix well. Stir in nuts, if included.
Divide batter in half into two separate medium bowls. Add cooled chocolate to one bowl and stir until well combined.
Pour yellow cake mixture into the prepared baking dish and spread evenly with an offset spatula. Add dollops of chocolate mixture alternately across yellow mixture. Run knife through batter to marbleize. Bake 40-45 minutes. Remove from oven and allow to cool completely.