Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1110837
    DanielDorian
    Participant

    Hi there,
    thanks in advance for your support!
    I had a problem with making reference to the source of a photo. The sub-title did not show next to the particular photo. That’s why I got some help from a freelancer. Hi fixed it but his answer is not exactly satisfactory…
    “Your theme does not support directory structures in child themes, meaning the only way to make this adjustment was in the actual theme file: x/framework/functions/global/featured.php

    I have added this code (without any comment marks):

    echo ‘<div class=”post-thumbnail-caption”>’ . get_post(get_post_thumbnail_id())->post_excerpt . ‘</div>’;

    JUST ABOVE THE FEATURED GALLERY OPTION!

    This means you have to save this mail somewhere and when you update your theme and the caption is gone, you can add it again.”
    Is there an easier route? Why weren’t the sub-titles showing in the first place?
    The website is still offline but I could grant access in case that would be helpful.
    Thanks a lot
    Daniel

    #1110843
    Christian
    Moderator

    Hey Daniel,

    X supports directory structures as you can see here https://community.theme.co/kb/customization-best-practices/. But, because the functions folder contains functions, that requires another method. You can see in the files that functions in there are wrapped with functions_exists function which checks if a function exists anywhere in your site. Let’s take the featured gallery function for example:

    if ( ! function_exists( 'x_featured_gallery' ) ) :
         function x_featured_gallery()...
    endif;

    ! function_exists means “if function does not exist then use the function below which is x_featured_gallery“. With that said, you can copy the function in your child theme’s functions.php so it will use that instead of the function that comes out of the box.

    You can pass this to your developer so he could copy and override the function in functions.php.

    Hope that helps. 🙂

  • <script> jQuery(function($){ $("#no-reply-1110837 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>