It’s very interesting, one day in Kailash, Goddess Parvati was looking a little bit bored because Shiva was just sitting there in deep, deep meditation. And she called, “Oh Lord.” And Shiva didn’t respond.
Goddess Parvati just stood there watching him for a long, long time. And ultimately when Lord Shiva opened his eyes, Goddess Parvati bowed down with devotion to the Lord. And she asked surprisingly, “My Lord, I have a question. The whole world meditates upon you, everyone is praying to you, meditating upon you, contemplating you, upon whom are you meditating?”
And Lord Shiva replied with a smile, “I always meditate on Rama. Rama is always in my heart" and with the happy face he continued, "Lord Vishnu is going to take Rama avatar with Goddess Lakshmi and I will serve them with Hanuman".
(This conversation happened before Rama avatar of Lord Vishnu)
From this conversation, it is clear that Lord Shiva mediates on Lord Rama. It is not only because of Lord Rama,the avatar of Lord Vishnu. Lord Shiva always have pure love on Lord Rama and so he give Lord Rama such a holy place in his heart.