Tagged: x
-
AuthorPosts
-
September 5, 2016 at 5:34 pm #1162199
JeypolitanParticipantHi there!
First of all, I love theme X and the possibility of “The Grid”.
What I wonder if it is possible to do, is to use The Grid on my homepage to display my blog posts?
Currently when I hover my blog posts, it turns white (see screenshot “2. Currently Hover”).
What I would like, is that when on the homepage I hover my blog post/featured image, it will be like The Grid’s Lisboa (see link). That it will display the effect on top of my featured image instead of only a white blur (currently).Please advise if it is possible to make my posts on the homepage be like The Grid instead of just white shade.
Many thanks.
All best,
JenniferSeptember 5, 2016 at 5:35 pm #1162202
JeypolitanParticipantThis reply has been marked as private.September 5, 2016 at 11:34 pm #1162524
Paul RModeratorHi Jennifer,
Kindly refer to the link below.
https://community.theme.co/kb/integrated-plugins-the-grid/
Hope that helps.
September 6, 2016 at 8:50 am #1163042
JeypolitanParticipantHi there,
Thanks for your response!
I did not find what I wanted with the link you sent above, but I found it here.
A. They tell me to replace the index/search/archive template.php of my theme (see screenshot 1). They say that in my files I will find the main loop “if ( have_posts() ):
while ( have_posts() ): the_post();” etc. I do not have this in my index.php/search.php OR archive.php.B. They tell me to replace all this code with this code: “The_Grid(‘My Grid Name’, true); // where true is for template mode“. When I replace or insert the code into my index.php file, nothing changes OR my page stops working entirely.
Why can I not find the the code A. in my index.php file? And why can I not replace it with code B. to get my The Grid to replace the standard WordPress/Theme X grey fade filter on my posts? Please advise.
Thank you.
Kind regards,
JenniferSeptember 6, 2016 at 10:34 am #1163160
ChristianModeratorHey Jennifer,
Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!
September 6, 2016 at 11:28 am #1163245
JeypolitanParticipantHi there,
I have spoken with The Grid and done some research, and it says everywhere that the loop “if ( have_posts() ):” is supposed to be in every single website/theme. The Grid says I need to take this up with you. It should be in every index.php file. I have searched everywhere in my Theme X index.php file, and this loop is nowhere to be found. Please do advise on this.
Kind regards,
JenniferSeptember 6, 2016 at 2:31 pm #1163445
Nabeel AModeratorHi again,
You should be able to find the loop in _index.php file which can found by navigating to /x/framework/views/global/_index.php via FTP. I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Hope this helps!
September 6, 2016 at 4:16 pm #1163538
JeypolitanParticipantHi there,
Thank you for your response. I have now found the _index.php file and copy + pasted it into the same folder in my child theme.
I still do not understand why nothing changes when I replace the code? I have searched lots in this forum and Theme X always used to help with .php modifications (they also always helped me with my modifications and queries). Please do advise how I can easily change my index blog posts to “The Grid” using _index.php as explained here. From what I read it should be very easy, but I just don’t manage to make it work.
Thank you.
Kind regards,
JenniferSeptember 7, 2016 at 2:35 am #1164058
Paul RModeratorHi Jennifer,
Try changing the code in your _index.php with this.
<?php // ============================================================================= // VIEWS/GLOBAL/_INDEX.PHP // ----------------------------------------------------------------------------- // Includes the index output. // ============================================================================= $stack = x_get_stack(); if ( is_home() ) : $style = x_get_option( 'x_blog_style' ); $cols = x_get_option( 'x_blog_masonry_columns' ); $condition = is_home() && $style == 'masonry'; elseif ( is_archive() ) : $style = x_get_option( 'x_archive_style' ); $cols = x_get_option( 'x_archive_masonry_columns' ); $condition = is_archive() && $style == 'masonry'; elseif ( is_search() ) : $condition = false; endif; ?> <?php if ( $condition ) : ?> <?php The_Grid('Lisboa Main Page', true); ?> <?php else : ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php x_get_view( $stack, 'content', get_post_format() ); ?> <?php endwhile; ?> <?php else : ?> <?php x_get_view( 'global', '_content-none' ); ?> <?php endif; ?> <?php endif; ?> <?php pagenavi(); ?>I can see you have w3 total cache installed, kindly clear your plugin cache and deactivate it for a while until this changes are done.
It’s possible to implement a change, and not have it take place because a cached version of the page or various resources are loading instead of the latest version.
Thanks
September 7, 2016 at 9:23 am #1164516
JeypolitanParticipantHi there,
Thank you for your reply.
I cleared my plugin cache and deactivated it as stated above, and then I pasted the above code into my _index.php file, and still unfortunately nothing changed? I tried pasting it into both my _index.php file in my child theme and in my main theme, but nothing changed? Please advise.
Best,
JenniferSeptember 7, 2016 at 5:02 pm #1165236
RadModeratorHi Jennifer,
Please change this line,
<?php if ( $condition ) : ?>to this
<?php if ( is_home() ) : ?>There are two other conditions that affect it, hence, let’s narrow it for home page only.
Thanks!
September 7, 2016 at 7:14 pm #1165360
JeypolitanParticipantHi there,
Thank you for your reply.
There is still no luck with that, unfortunately. I changed the $condition to is_home, but nothing has changed at all. The Grid’s support team said that it is a very easy process to replace the standard template to The Grid’s Lisboa template (my request), that I should only need to replace a code in the _index.php file. The code above did unfortunately not work/make any difference. Please advise. What they say the code needs to be replaced by is stated here (“USING THE GRID AS A TEMPLATE”). Please advise.
Best,
JenniferSeptember 8, 2016 at 1:15 am #1165882
Paul RModeratorHi,
I went ahead and fix it for you.
I changed the code in your _index.php file to this.
<?php // ============================================================================= // VIEWS/GLOBAL/_INDEX.PHP // ----------------------------------------------------------------------------- // Includes the index output. // ============================================================================= $stack = x_get_stack(); if ( is_home() ) : $style = x_get_option( 'x_blog_style' ); $cols = x_get_option( 'x_blog_masonry_columns' ); $condition = is_home() && $style == 'masonry'; elseif ( is_archive() ) : $style = x_get_option( 'x_archive_style' ); $cols = x_get_option( 'x_archive_masonry_columns' ); $condition = is_archive() && $style == 'masonry'; elseif ( is_search() ) : $condition = false; endif; ?> <?php if(is_home()): ?> <?php echo do_shortcode('[the_grid name="LisboaMainPage"]'); ?> <?php elseif ( $condition ) : ?> <?php x_get_view( 'global', '_script', 'isotope-index' ); ?> <div id="x-iso-container" class="x-iso-container x-iso-container-posts cols-<?php echo $cols; ?>"> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php if ( $stack != 'ethos' ) : ?> <?php x_get_view( $stack, 'content', get_post_format() ); ?> <?php else : ?> <?php x_ethos_entry_cover( 'main-content' ); ?> <?php endif; ?> <?php endwhile; ?> <?php else : ?> <?php x_get_view( 'global', '_content-none' ); ?> <?php endif; ?> </div> <?php else : ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php x_get_view( $stack, 'content', get_post_format() ); ?> <?php endwhile; ?> <?php else : ?> <?php x_get_view( 'global', '_content-none' ); ?> <?php endif; ?> <?php endif; ?> <?php pagenavi(); ?>September 8, 2016 at 6:29 am #1166227
JeypolitanParticipantHi there,
Thank you for your reply.
That did the trick – and I am very happy that the code above worked! Unfortunately for the last time, a few issues occurred:
1. The post’s Title + Text Excerpt is now gone. Please advise how I can put my title back to how it was – with the Title above the posts, and a small Text Excerpt below the post.
2. When clicking on the post/image, it does not take me to the actual post? It takes me to a pop-up version of the image I clicked on? When clicking on the post, I wish to navigate to the actual post (not to the picture alone).
3. When adding a new post, it doesn’t appear on my main page anymore?
Please advise, and after these two issues get fixed – it should be finished!
Best,
JenniferSeptember 8, 2016 at 5:43 pm #1167133
RadModeratorHi there,
1. Do your The Grid has title and excerpt? The code replaces the default blog posts display, so it’s really different from your The Grid display. What you could do is update your The Grid and edit its skin using its own skin builder.
2. Please update your The Grid plugin first, skin builder is available from version 2.1.0
3. Since you replaced your standard blog posts with The Grid, it’s now in control of plugin’s configuration. You’ll have to change your grid sort settings.
You’ll have to manage all of these within your plugin. These are no more related to blog posts. Though, I may able to provide some help if there are any issues with its setting. You can also check their documentation here http://theme-one.com/docs/the-grid/
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1162199 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
