• I have inherited an old WordPress site from a developer (beginner myself) and am struggling to understand it. He has set it up with a child theme. In the folder of the child theme there is a file “Content.php”, which contains some logic to include certain ACF form fields. On a specific WordPress page, Content.php is rendered.

    What I don’t understand: where is it specified to render Content.php on that specific WordPress page? It works but I don’t see the reference to Content.php anywhere. I’ve looked at the page in the WordPress database, but nowhere do I see a reference to Content.php. Where might I find the reference?

    P.S. Background: If I update the WordPress page without changing anything inside WordPress, it no longer works and Content.php is no longer rendered on that page. So by understanding how Content.php becomes part of the page, I hope to be able to edit that page while also continue to include Content.php in that page.

    P.P.S. The content of Content.php

    <?php
    	acf_form_head();
    	get_header();
    ?>
    
    <div id="content">
    	<div class="wrap">
    		<form id='post' class='acf-form' action='' method='post'>
    
    			<?php
    				acf_form([
    			    		'field_groups'	=> ['gr77d'],
    					'post_id'	=> 'new_post',
    					'post_title'	=> false,
    					'post_content'	=> false,
    					'form' 		=> false,
    			    		'submit_value' 	=> __("Submit", 'acf'),
    			    		'updated_message' => __("Thank you!", 'acf'),
    				]);
    
    				if(current_user_can('activate_plugins')) {
    					acf_form([
    						'field_groups' => ['gra4b'],
    						'post_id' => 'new_post',
    						'form' => false
    					]);
    				}
    			?>
    
    			<div class="acf-form-submit">
    				<input type="submit" class="acf-button" value="Submit resource suggestion">
    				<span class="acf-spinner"></span>
    			</div>
    
    		</form>
    	</div>
    </div>
    
    <?php get_footer();
  • The topic ‘How is this child-theme file being rendered on specific WP page?’ is closed to new replies.