Home › Forums › Basel support forum › XTEMOS Post Types plugin causing load delay on homepage only
XTEMOS Post Types plugin causing load delay on homepage only
- This topic has 5 replies, 2 voices, and was last updated 5 years, 5 months ago by Artem Temos.
-
AuthorPosts
-
May 23, 2019 at 6:39 am #125279
GCMarketing AdminParticipantHello 🙂
I am having an issue with my website with XTEMOS Post Types plugin – causing a 44-second delay on my homepage only.Not sure why this is occurring – could you kindly assist me to resolve?
If i visit the homepage directly I have the 44 sec wait
If i visit the services page – its instant, and then i can click and open the homepage with no issuesIts quite odd
Attachments:
You must be logged in to view attached files.May 23, 2019 at 11:27 am #125339
Artem TemosKeymasterHello,
Try to create a file
content-portfolio.php
in the child theme with the following code<?php /** * The default template for displaying content */ global $basel_portfolio_loop; $size = 'large'; $classes[] = 'portfolio-entry'; if( !empty($basel_portfolio_loop['columns']) ) $columns = ( ! empty( $basel_portfolio_loop['columns'] ) ) ? $basel_portfolio_loop['columns'] : 3; if( ! is_single() ) { $classes[] = basel_get_grid_el_class(0, $columns, false, 12); $classes[] = 'portfolio-single'; $classes[] = 'masonry-item'; //$size = 'medium'; } $cats = wp_get_post_terms( get_the_ID(), 'project-cat' ); if( ! empty( $cats ) ) { foreach ($cats as $key => $cat) { $classes[] = 'proj-cat-' . $cat->slug; } } ?> <article id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>> <?php if ( has_post_thumbnail() && ! post_password_required() && ! is_attachment() && ! is_singular( 'portfolio' ) ) : ?> <header class="entry-header"> <figure class="entry-thumbnail"> <?php if ( ! is_single() ): ?> <a href="<?php echo esc_url( get_permalink() ); ?>" class="portfolio-thumbnail"> <?php the_post_thumbnail( $size ); ?> </a> <?php else: ?> <?php the_post_thumbnail( $size ); ?> <?php endif ?> <a href="<?php echo esc_url( wp_get_attachment_url( get_post_thumbnail_id($post->ID) ) ); ?>" class="portfolio-enlarge"><?php _e('View Large', 'basel'); ?></a> </figure> <?php endif; ?> <div class="portfolio-info"> <?php if ( is_single() ) : ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php else : ?> <h1 class="entry-title"> <a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php the_title(); ?></a> </h1> <?php endif; // is_single() ?> <?php if( ! empty( $cats ) ) { ?> <ul class="proj-cats-list font-alt"> <?php foreach ($cats as $key => $cat) { $classes[] = 'proj-cat-' . $cat->slug; // get_term_link( $cat, 'project-cat' ); ?> <li><?php echo esc_html($cat->name); ?></li> <?php } ?> </ul> <?php } ?> </div> </header> <?php if ( is_singular( 'portfolio' ) ) : ?> <div class="entry-content"> <?php the_content(); ?> </div><!-- .entry-content --> <?php endif; ?> </article><!-- #post -->
Regards
May 23, 2019 at 12:26 pm #125368
GCMarketing AdminParticipantThank you Artem
I have added that code in the child theme as a new file called content-portfolio.phpI tried deactivating the plugin XTEMOS Post Types plugin, after creating the above file but no change.
Did I miss something?
May 23, 2019 at 2:22 pm #125395
Artem TemosKeymasterYes, it seems to work well now.
May 23, 2019 at 2:29 pm #125397
GCMarketing AdminParticipantYes, it is working perfectly now for me too – thank you so much
May 23, 2019 at 2:29 pm #125398
Artem TemosKeymasterYou are welcome!
-
AuthorPosts
- You must be logged in to create new topics. Login / Register