Search Page, Category, and Archive Page Customization Error

Good day!

I’m trying to create a custom page template for the search/archive/category pages.

I created a category.php and added the wp-index.php content from the stack that I’m using which is integrity
so this is the content

<?php /* Template Name: Category Page */ ?> <?php get_header(); ?>
<?php x_get_view( 'global', '_index' ); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

The problem is when I visit any category page it’s resulting to an error
Warning: include(/var/www/html/wp-content/themes/xpro-child/index.php): failed to open stream: No such file or directory in /var/www/html/wp-includes/template-loader.php on line 74

Warning: include(): Failed opening ‘/var/www/html/wp-content/themes/xpro-child/index.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /var/www/html/wp-includes/template-loader.php on line 74

The same error appears on the search.php page template that I created though instead of x_get_view function I use the bare get_template_part function
Here’s the content

<?php /* Template Name: Search Page */ ?> <?php get_header(); ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
  <?php  get_template_part( '/framework/views/c7-templates/_search-content', 'part'); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Hi @cirrus7,

Thanks for writing in! Regretfully, we do not have support for customization issues. You may wish to consult a developer to assist you with this. Our customization guide might also help. Please see https://theme.co/apex/forum/t/customizations-best-practices/205. Also, only use x_get_view and not get_template_part

Thanks for understanding. Take care!

I don’t understand what you mean by not having a support for customization.
I mean I wasn’t asking for the customization itself, I was asking why it’s causing error. Because in standard wordpress templating https://developer.wordpress.org/themes/basics/template-hierarchy/ , the templates I did should work fine, it’s just a standard if have post then the post loop.
And Im asking because it’s not working because im using X Pro, and I don’t know what’s under the hood of x pro, and I’m not a pro developer myself.
I also know as much as how the x pro views work https://theme.co/apex/forum/t/customizations-best-practices/205

I also said I was using the x_get_view method in the category.php template and that’s why I said I used the get_template_part function for the sake of comparison.
The category.php template actually has the same code with the wp-index.php from VIEWS/INTEGRITY/WP-INDEX.PHP

So I just want to know what I’m doing wrong that conflicts with X PRO System, because all I’m doing is just standard wordpress custom page template.

Thanks

Hello There,

Would you mind providing the ftp details so that we can check your theme files? You may ave inserted incorrect codes or uploaded in the wrong folder.

To do this, you can make a post with the following info:

  • WP login URL
  • WP User
  • WP Password
  • FTP Hostname
  • FTP Username
  • FTP Password

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.