'Put content of wordpress page inside div
I am trying to put content of wordpress page content inside div but that does not work ,
simply trying ot do that
echo '<div style="display:none">' . the_content . '</div>';
but it is rather than showing content inside div it is showing each of them the content and divs not echoing like that thanks in advance
Solution 1:[1]
you can get content by using this code and also you have to remove style from your div
echo '<div>' . get_the_content() . '</div>';
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dotsquares |