Marriage is undeniably inescapable in Wilde’s play, An Ideal Husband. It seems that there are as many perceptions of marriage as there are characters in the play, as each main character views the prospect (or reality) of marriage completely differently. Though the institution is mocked constantly throughout the play, its importance is never understated, even by those desiring to be life-long bachelors. Even Lord Goring, one of Wilde’s more obvious insert characters, says to Robert, “No man should have a secret from his own wife.” Though he immediately follows this statement up with the qualification, “She invariably finds it out.” Even Goring is ultimately unable to avoid married life, as the play concludes to his marriage to Mabel, though their wedding is itself a parody of marriage itself, as Mabel expresses disgust at the very idea that Goring would be an ideal husband to her.
It seems that, through heavily parodying the idea of marriage, but never reducing it to absurdity, that the play is recognizing that all things worth parodying must have at least some level of importance in society. In this way, An Ideal Husband is far from anti-marriage, just as The Importance of Being Earnest is far from being anti-posh, rather both seek to point out the absurdity of real life, without reducing real life to mere absurdity.
This is not to say that An Ideal Husband is pro-marriage or even neutral on the subject, but rather that it is able to make its criticisms of marriage more effectively by recognizing its importance, something that would not be possible if Wilde painted the institution as wholly undesirable and negative. Overall, I think it is clear that there are a lot of moving parts in An Ideal Husband, and if you read past the incredibly rich and witty dialogue, you can see Wilde toeing the line of what can and cannot be said, or performed on stage.