Tagged: x
-
AuthorPosts
-
December 10, 2016 at 4:33 pm #1288575
outer_netParticipantHey guys,
I don’t know how it has happened but my posts (News) Page is in a real mess!
http://www.waterstreetgallery.co.uk/news/
This is the culprit:
// Get Featured Image URL // ============================================================================= if ( ! function_exists( ‘x_get_featured_image_url’ ) ) : function x_get_featured_image_url( $size = ‘full’ ) { $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), array( 300, 212 ) ); $featured_image_url = $featured_image[0]; return $featured_image_url; } endif;
I can’t seem to find how or why it appearing in the posts.
It has been a while since we have needed to use a post but now I don’t know where to start.
Any help would be great,
Thanks
AbsDecember 10, 2016 at 4:33 pm #1288576
outer_netParticipantThis reply has been marked as private.December 11, 2016 at 12:45 am #1288778
ChristopherModeratorHi there,
Please update your code to :
// Get Featured Image URL // ============================================================================= if ( ! function_exists( 'x_get_featured_image_url' ) ) : function x_get_featured_image_url( $size = 'full' ) { $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), array( 300, 212 ) ); $featured_image_url = $featured_image[0]; return $featured_image_url; } endif;Hope it helps.
December 11, 2016 at 3:38 am #1288839
outer_netParticipantGreat, thanks
Where is this code located ? CSS
December 11, 2016 at 4:50 am #1288868
ChristopherModeratorHi there,
It’s located under child theme’s functions.php file.
You can access it via FTP account.Thanks.
December 11, 2016 at 5:22 am #1288879
outer_netParticipantAhhh,
I don’t know what I have done -things have gone a bit pete tong!
The code was not in the Functions PHP file to start with.
Please help ASAP
Thanks
December 11, 2016 at 5:29 am #1288883
outer_netParticipantEvery page seems messed up!!!!
December 11, 2016 at 5:41 am #1288892
ChristopherModeratorHi there,
I fixed two files:
#1 I added following code to functions.php file and remove the other code :
add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );This line of code is necessary, you may had removed it accidentally.
#2 I found the code causing the issue under
/waterstreetgallery.co.uk/wp-content/themes/x-child/framework/views/integrity:<?php // ============================================================================= // VIEWS/INTEGRITY/CONTENT.PHP // ----------------------------------------------------------------------------- // Standard post output for Integrity. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-featured"> <?php x_featured_image(); ?> </div> <div class="entry-wrap"> <?php x_get_view( 'integrity', '_content', 'post-header' ); ?> <?php x_get_view( 'global', '_content' ); ?> </div> <?php x_get_view( 'integrity', '_content', 'post-footer' ); ?> </article> // Get Featured Image URL // ============================================================================= if ( ! function_exists( 'x_get_featured_image_url' ) ) : function x_get_featured_image_url( $size = 'full' ) { $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), array( 300, 212 ) ); $featured_image_url = $featured_image[0]; return $featured_image_url; } endif;I went ahead and removed the code. Now your site is working fine again.
Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1288575 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
