Tagged: x
-
AuthorPosts
-
July 31, 2016 at 5:22 am #1110837
DanielDorianParticipantHi 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.phpI 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
DanielJuly 31, 2016 at 5:41 am #1110843
ChristianModeratorHey 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_existsfunction 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_existsmeans “if function does not exist then use the function below which isx_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. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1110837 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
