I guess this should work (untested)
Code:
local function HideFrame(frame)
frame:HookScript("OnShow",function()
frame:Hide()
end)
frame:UnregisterAllEvents()
frame:Hide()
end
local myFrame = CreateFrame("Frame")
myFrame:RegisterEvent("ADDON_LOADED")
myFrame:RegisterEvent("PLAYER_LOGIN")
myFrame:SetScript("OnEvent",function(self,event,addon)
if event == "PLAYER_LOGIN" then
HideFrame(CompactPartyFrameTitle)
elseif addon == "Blizzard_CompactRaidFrames" then
for i = 1,8 do
HideFrame(_G["CompactRaidGroup"..i.."Title"])
end
end
end)