- This topic has 38 replies, 3 voices, and was last updated 5 years, 4 months ago by
David.
-
AuthorPosts
-
December 23, 2020 at 4:14 am #1591813
Max
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.December 23, 2020 at 4:42 am #1591835Max
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?December 23, 2020 at 5:11 am #1591867David
StaffCustomer SupportHi there,
you can use this plugin to create shortcodes for any of your widgets:
https://en-gb.wordpress.org/plugins/widget-shortcode/
You can then place that shortcode anywhere within your content
Further to this, you also have Widget CSS Classes plugin:
https://en-gb.wordpress.org/plugins/widget-css-classes/
This will allow you add any class to the widget including the
hide-on-*classesDecember 23, 2020 at 6:43 am #1591940Max
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
December 23, 2020 at 7:38 am #1592173David
StaffCustomer SupportThe only alternative would be to look for a Tag Cloud plugin that provides the functionality you need.
December 29, 2020 at 6:19 am #1598151Max
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 thehide-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
December 29, 2020 at 6:25 am #1598156David
StaffCustomer SupportThat CSS is perfectly fine. The
hide-on-*classes simply writes that kind of CSS for you.December 29, 2020 at 6:48 am #1598179Max
Thanks a lot for all of the quick replies and great support!
December 29, 2020 at 7:20 am #1598353David
StaffCustomer SupportGlad we could be of help.
-
AuthorPosts
- You must be logged in to reply to this topic.