Site logo

Archived topic

Styling Single Post Page

38 replies · Started by Max on August 5, 2019

Viewing posts 31–39 of 39

Inspired by another post in the forum I found a workaround which seems to do the job, too.

@media (max-width: 768px) {
    #tag_cloud-7 {
	display: none !important; 
    }
}

Is that an agreeable solution?
I would still very much appreciate a short explanation regarding my previous post.

Regarding your solution to add another (2nd) tag cloud you wrote:

As for the 2nd tag cloud, we add this for mobile so we have to set it to hide on desktop.

If this tagcloud plugin you’re using has a shortcode, you can place its shortcode within a Block element or Hook element and set its display rule to “posts – all posts”.

The problem is that I am not using a plugin (as far as I can tell) but the built-in tag cloud widget which I can only add to the right/left sidebar, header footer, top bar and off canvas panel (as far as I can see). So would there even be an option to add it to any hook or block element?

Secondly (building on that), your solution of changing the tag cloud position would work if I only wanted to place the tag cloud before/after the comment section or any predefined section as far as I could see from looking at the available hooks on generatepress.
However, I did not find any hook which would allow me to place the content (tag cloud) below a certain element (e.g. post carousel plugin) within a page. That is what my original request was playing at. The said post-carousel does come with a shortcode [post-carousel-pro id="481"] in case this turns out to be useful here.
Perhaps a solution would be to try and create a shortcode for the tag cloud in order to insert it directly into the according static page, e.g. after the shortcode for the post carousel?

Hi David,

thanks for the quick response. Just to clarify: There is no other option to implement the changes I want to accomplish than to use two plugins?

Best regards

The only alternative would be to look for a Tag Cloud plugin that provides the functionality you need.

Hello again,

I tried the shortcode widget and it works smoothly - thank you for the suggestion.
Regarding the second suggestion (adding a plugin to apply css classes to widgets - in this case the hide-on-* classes) I did take a detour - so I did not install the plugin but instead I used this code since it seems to offer more flexibility + I could avoid installing another plugin:

@media (max-width: 768px)
    {
    #tag_cloud-7 {
	display: none !important; 
        }
}

@media (min-width: 769px)
    {
    #tag_cloud-8 {
	display: none !important; 
        }
}

Do you see any disadvantages compared to using the hide-on-* classes which you mentioned?

Best regards

That CSS is perfectly fine. The hide-on-* classes simply writes that kind of CSS for you.

Thanks a lot for all of the quick replies and great support!

Glad we could be of help.

This archived topic is closed to new replies.