Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1472797

    Hi team,
    I’ve an issue when :

    • I create an alb_custom_layout for my pages with a section color. I would set a dynamic background with the featured image of my pages.
    • I set correctly the image background with a default img and I write {wp_custom_field:_thumbnail_id} for the dynamic value
    • For the content of my section, I add in special_heading block a dynamic title ({wp_post_title} in heading and {wp_post_excerpt} in sub-heading field)
    • For testing, I’ve add too a dynamic image in my section color content (same dynamic field :{wp_custom_field:_thumbnail_id} )
    • I call my alb_custom_layout on my pages and I set the featured image on each pages (page A, page B, page C…)
    • In front, when I go on page A, I’ve the correct background image (the featured image of page A) , I’ve the correct title, subtitle and my image content is the featured image of page A too
    • BUT, when I go on page B, C or D, I’ve the featured image of page A for the background of my section color, the good title, subtitle and the image content work correctly !

    What’s wrong with the dynamic call of the background image of my section color?

    Thanks for your help, I put in private the access of my site.

    Marc

    • This topic was modified 1 month, 2 weeks ago by Octopus4444.
    #1474133

    Hey Octopus4444,
    Thank you for your patience, but the example links that you posted all lead to a 404, when I check a few of your pages the color section background image with wp_custom_field:_thumbnail_id} seem to work correctly when I check. For example on /modules-specifiques/ you have this
    Screen Shot 2024 12 22 at 7.28.48 AM
    pointing to this thumbnail
    Screen Shot 2024 12 22 at 7.31.33 AM
    and on the frontend it shows correctly
    Screen Shot 2024 12 22 at 7.32.46 AM
    perhaps you have already sorted this out?

    Best regards,
    Mike

    #1474189

    Hello Mike,

    Thank you for taking the time to look into my issue. Unfortunately, your response came a bit late, and I had to find a functional workaround for this site, which belongs to a client I needed to deliver to quickly! I no longer use dynamic page content for the headers of my pages, which bypasses the issue but does not resolve it.

    That said, the problem still exists, and I’ve set up a sandbox site with a reproduction of the issue.

    I’ll send you the access details in a private message.

    Thanks again for your help, and I hope you have a wonderful holiday season!

    Best regards,
    Marc

    #1474378

    Hi,
    Thanks for your patience, the color section background image is added via css and there seems to be a caching issue so the same image is shown on each page.
    I added this to the end of your child theme functions.php

    function custom_avf_post_css_create_file( $create ) {
    	return false;
    }
    
    add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );

    and it seems to have solved, please clear your browser cache and check.

    Best regards,
    Mike

    #1474475

    Hello Mike,
    First of all, I wish you a happy and prosperous New Year 2025!

    Thank you for taking the time to look into my issue and find a solution!
    It seems to be working well.

    Do you think this fix will be integrated “natively” into an upcoming theme update, or will I need to apply this fix to my child theme?

    Thanks again for your help.
    Best regards,
    Marc

    #1474488

    Hi,
    Glad that this helped, please apply this to your child theme, as this fix is for a server caching issue that is not experienced by all users/servers.
    Shall we close this thread then?

    Best regards,
    Mike

    #1474519

    Hello Mike,
    Thank you for your clarifications. I’m adding this fix to my child theme!
    You can close the topic; my issue is resolved.

    Thanks again for your help!
    Best regards,

    Marc

    #1474570

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Issue with alb_custom_layout and dynamic background image on section color’ is closed to new replies.