Answered by Shaykh Amjad Rasheed
I have heard that according to Imam Ramli, it is permissible to pray the pre-zuhr sunnas and post-zuhr sunnas with a single opening Allahu Akbar. If I want to do this and pray 8 rak‘as [h: i.e. the 4 pre-zuhr sunna rak‘as and the 4 post-zuhr sunna rak‘as together], how should I do it and what should I intend?

Yes, according to Imam Ramli, it is permissible to join the sunnas that come before the prescribed prayers with sunnas that come after them. In such a case, one would say, “I intend to pray 8 rak‘as of pre[-zuhr] and post[-zuhr] sunnas,” as Imam Bajuri mentions in his Hashiya (1.137). After this, one prays the 8 rak‘as with a single salam. [1]
Amjad Rasheed
Amman, Jordan
(Translated by Hamza Karamali)
[1] Translator’s Note: It is only valid to join the pre-zuhr and post-zuhr sunnas after praying the prescribed prayer, since the time for the post-zuhr sunnas does not enter until one has prayed zuhr prayer.