Hi,
I know how to hide a content using CSS and also with php. However, which would be advisable?
My scenario –
I have added a footer widget (e.g. Recent Posts) out of the 4 listed ones in a WP site. Now, on a particular page, I wish to display this widget (e.g. Recent Posts) but make it hidden or removed from rest of the site.
I tried with the conditional tags in php and also with CSS display:none;
.
separately.
\#recent-posts-5 {
display:none;
}
.page-id-123 #recent-posts-5 {
display:block;
}
<code></code>
Now, which will be good and advisable, in terms of 5EO, page speed performance and usability across almost all devices.
Many thanks.
Kalyan