Site logo

Archived topic

Columns not working under Category

41 replies · Started by Guna on April 1, 2021

Viewing posts 31–42 of 42

ok, in the snippet or css?

In the PHP Snippet - currently you have this code:

add_filter( 'option_generate_blog_settings', 'db_custom_category_arhive' );
function db_custom_category_arhive( $options ) {
  if ( is_category( 'travel-stories-about-local-cultures-and-people' ) ) {
    $options['post_image'] = true;  
  }
  return $options;
}

Delete that. And add this:

add_filter( 'option_generate_blog_settings', 'db_custom_category_arhive' );
function db_custom_category_arhive( $options ) {
  if ( is_category( 'travel-stories-about-local-cultures-and-people' ) ) {
    $options['post_image'] = true;
    $options['post_image_position'] = 'post-image-above-header';    
  }
  return $options;
}

OK, I did it, but still the same problem there.

So i removed the "chech" at "display featured images" in orrder to avoid double picture on the main page and to my susrprise the pictures under travel stories stayed in place as they should, above the title. I am very happy for that but I hope that it is not only because of cache.

Now that the picture problem is solved, I only have the widget problem left, because there is still the right sidebar widget under "TRavel STories" which I want to remove completly, but on the main page "Home" where I want to have the widget, my picture and the text under it is missing.

Can you provide screen recordings or screenshots of what you see on your end?

It seems sorted on my end as shown here: https://share.getcloudapp.com/E0uYbmYv

Perhaps you're seeing a browser cached version of your site. Can you try clearing it and check again?

So i removed the “chech” at “display featured images” in orrder to avoid double picture on the main page and to my susrprise the pictures under travel stories stayed in place as they should, above the title. I am very happy for that but I hope that it is not only because of cache.

Yeah that's what I meant when I said:

Note: It displayed twice because you seem to have added the image as a content within the post as well.

on my reply here: https://generatepress.com/forums/topic/columns-not-working-under-category/page/2/#post-1722729 - I should've been more concise. My bad.

Now that the picture problem is solved, I only have the widget problem left, because there is still the right sidebar widget under “TRavel STories” which I want to remove completly, but on the main page “Home” where I want to have the widget, my picture and the text under it is missing.

You can remove that with a Layout Element.

Create one and have it setup like this: https://share.getcloudapp.com/llu5D8EB

Yes, I see exactly what you see there, so the pictures are solved, but talking about caches, how do I remove them, I have never done it in my life.

When you say Layout element regarding widgets, can you tell me more in detail where it is located and how exactly do I have to do it to show it fully (with my picture and text under it which is missing now) on the main page "Home" and remove it completely under TRavel STories?

Yes, I see exactly what you see there, so the pictures are solved, but talking about caches, how do I remove them, I have never done it in my life.

Oh that's fine you can ignore that. That's my forum signature. :)

It's only applicable for sites that use one. Your site doesn't seem to be using one so you can ignore that.

When you say Layout element regarding widgets, can you tell me more in detail where it is located and how exactly do I have to do it to show it fully (with my picture and text under it which is missing now) on the main page “Home” and remove it completely under TRavel STories?

Layout elements are created through Admin Dashboard > Appearance > elements.

Example: https://share.getcloudapp.com/NQuwDBo8

Follow the settings in the video link on my previous reply.

Yes, it worked, but now the last problem: my side widget where I removed it now was complete, whereas the one that stayed in the frontpage, is not complete and now that I removed the one under Travel stories, the widget on the front page still is missing my picture and my name. I went under the widget setting and can see that my name and description under it are there, so why does it not appear on the front page?

You need to delete this CSS:

body:not(.category-travel-stories-about-local-cultures-and-people) aside#text-4 {
    display: none;
}

OK, now finally everything works, thank you so much for your patience!
Just to understand the better the 2 places, what is the difference between simple CSS and additional CSS in Generate Press?

Simple CSS is a plugin.
https://wordpress.org/plugins/simple-css/

It allows you to conditionally apply your CSS on specific posts/pages.

It's an old one. And to be frank, this isn't necessary anymore as there are other ways of doing this like being more specific in CSS selectors or by using Hook elements to add CSS.

Additional CSS is the default way of adding CSS. It's in the customizer settings. This CSS is global, meaning, whatever CSS added here is applied throughout the whole site.

Glad everything works for you now. :)

This archived topic is closed to new replies.