Custom Home Page WithX Pro Child Theme

For the life of me I just can’t figure out how to do this…

I created a new page on my site called “Home”, and assigned that as the default home page in wordpress.

I’m working off a child theme. I know that I have to override default behavior by putting a file under “framework > views” in the child theme.

What file do I override/edit? I assumed I had to copy at least one file from X Pro > Framework > Views. Whats the template hierarchy of X Pro? I’ve tried copying and editing _content.php, _index.php… creating a custom page-home.php (using home as the appropriate slug)…

I know its something probably seriously simple… but at this point I’m about to give up with X Pro … again… and just go back to coding from scratch…

Hi @neelhtaky

That’s the file you need to duplicate in Child theme and modify it:

/pro-child/framework/views/global/_content-the-content.php

For example, if you added this snippet:

  	<?php if ( is_front_page() ) {	
				echo'<h2>Only Displays On The Front Page</h2>';
    }
  	?>

After this line <?php the_content(); ?> you will get custom content after the front page content.

Thanks.

1 Like

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