Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #4562138
Main Menu disappears on Single Post with ACF and specific Category
Open

Comments

  • jochite started the conversation

    Hello, I am having an issue with the visibility of my Main Menu on specific posts.

    The Setup:

    • Theme: Soledad (Updated version).
    • Plugins: Advanced Custom Fields (ACF) and WPBakery Page Builder.
    • File reference: I have attached a screenshot of the issue: Captura de pantalla 2026-04-30 145754.jpg.

    The Problem:

    1. I created a Field Group in ACF called "Ficha Biodiversidad".
    2. I set a location rule for this group to appear only when the Post Category is "Ficha Biodiversidad".
    3. I created a new post (e.g., "Silene Ifach") and assigned it to that category.
    4. Issue: When I view the post, the content and the ACF fields show up, but the Main Menu (Header) completely disappears. The rest of the site shows the menu correctly, but it vanishes on these specific posts.

    What I have checked:

    • The menu is correctly assigned to the "Primary Menu" location in Appearance > Menus.
    • The issue seems to trigger only when the ACF group and the specific category are active on the post.

    Attached files:  Captura de pantalla 2026-05-01 110244.png
      Captura de pantalla 2026-05-01 110111.png
      Captura de pantalla 2026-05-01 110001.png

  •  3,116
    PenciDesign replied

    Hi,

    For this case, please send me your WordPress admin account in a PRIVATE reply.
    I'll log in and try to help you check this problem.

    Regards,
    PenciDesign.

  •   jochite replied privately
  •  3,116
    PenciDesign replied

    Hi,

    The issue is that you selected the “Blank Layout WPBakery” option. You need to choose the “Default WordPress Theme Layout” option instead, as shown in the screenshot below.

    Screen-Shot-2026-05-01-at-18-37-53.png

    Regards,
    PenciDesign.

  •   jochite replied privately
  •  3,116
    PenciDesign replied

    Hi,

    There may be some confusion. When you select the “Blank” option, WPBakery removes all theme elements, including the header, footer, and sidebar.

    If the layout is displaying incorrectly, please check the styles and settings you have configured within WPBakery.

    Regards,
    PenciDesign.

  •   jochite replied privately
  •  3,116
    PenciDesign replied

    Hi,

    By default, the category ID is not included in the body class for single posts. If you would like to customize styles based on the category ID body class, you will need to add custom code to display it.

    You should paste this code into the function.php of the child theme or via the CodeSnippet plugin here: https://wordpress.org/plugins/code-snippets/

    add_filter( 'body_class', function( $classes ) {
    
    	if ( is_single() ) {
    		$categories = get_the_category();
    
    		if ( ! empty( $categories ) ) {
    			foreach ( $categories as $category ) {
    				$classes[] = 'category-' . $category->term_id;
    			}
    		}
    	}
    
    	return $classes;
    
    } );

    Regards,
    PenciDesign.