• I started a theme on a subdomain, and all worked fine but then installed WordPress on my main domain and get an error internal server error when I try and add the function.php. This is the entire file of functions.php, that worked on subdomain:

    
    <?php
        function LAID_init() {
        	// create a new taxonomy
        	register_taxonomy(
        		'LAID',
        		'post',
        		array(
        			'label' => __( 'LA ID Number' ),
        			'rewrite' => array( 'slug' => 'LAID' ),
        			
        		)
        	);
        	
        }
        add_action( 'init', 'LA_init' );
        
        
        
        function commandline_init() {
        	// create a new taxonomy
        	register_taxonomy(
        		'commandline',
        		'post',
        		array(
        			'label' => __( 'Command Line' ),
        			'rewrite' => array( 'slug' => 'commandline' ),
        			
        		)
        	);
        }
        add_action( 'init', 'commandline_init' );
        
        
        
        function relateditems_init() {
        	// create a new taxonomy
        	register_taxonomy(
        		'relateditems',
        		'post',
        		array(
        			'label' => __( 'Related Items' ),
        			'rewrite' => array( 'slug' => 'relateditems' ),
        			'hierarchical'      => true,
        			
        		)
        	);
        }
        add_action( 'init', 'relateditems_init' );
    ?> 
    

    Ive tried adding the functions.php from the default WordPress theme to my custom theme and that also causes an internal server error.

    Turn on debugging and got following errors:

        Warning: require(D:\Plesk\VHOSTS\...\httpdocs\wordpress/wp-content/themes/.../inc/template-tags.php): failed to open stream: No such file or directory in D:\Plesk\VHOSTS\...\httpdocs\...\wp-content\themes\...\functions.php on line 353
        
        Warning: require(D:\Plesk\VHOSTS\...\httpdocs\wordpress/wp-content/themes/.../inc/template-tags.php): failed to open stream: No such file or directory in D:\Plesk\VHOSTS\...\httpdocs\wordpress\wp-content\themes\...\functions.php on line 353
        
        Fatal error: require(): Failed opening required 'D:\Plesk\VHOSTS\...\httpdocs\wordpress/wp-content/themes/.../inc/template-tags.php' (include_path='.;.\includes;.\pear') in D:\Plesk\VHOSTS\...\httpdocs\wordpress\wp-content\themes\...\functions.php on line 353

    There is no line 353 in my functions.php and no require() function and no “/inc/template-tags.php” in my custom theme.

    Wordpress says it is up to date version 4.8.

Viewing 1 replies (of 1 total)
  • Thread Starter atrag

    (@atrag)

    Please somebody help. I am supposed to be working on this but for the second day I am sat doing nothing. Here is another error to add to the mystery:

    Fatal error: Cannot redeclare commandline_init() (previously declared in D:\Plesk\VHOSTS\sparklebox.co.uk\httpdocs\wordpress\wp-content\themes\sparklebox\functions.php:6) in D:\Plesk\VHOSTS\sparklebox.co.uk\httpdocs\wordpress\wp-content\themes\sparklebox\functions.php on line 14

    This appears when functions.php contains the following code:

    
    function commandline_init() {
    // create a new taxonomy
    register_taxonomy(
    ‘commandline’,
    ‘post’,
    array(
    ‘label’ => __( ‘Command Line’ ),
    ‘rewrite’ => array( ‘slug’ => ‘commandline’ ),
    
    )
    );
    }

    I have to say, I am very disappointed with the support from WordPress on this. This the official forum. Where else can I ask?

Viewing 1 replies (of 1 total)

The topic ‘Error when Transposing Functions.php’ is closed to new replies.