• Resolved jeffqc

    (@jeffqc)


    ive this s line all around wordpress dashboard since ive install the new 2.9 version
    Warning: file(/home/stripper/public_html/celebquebec.com/wp-content/home/stripper/public_html/celebquebec.com/wp-content/themes/metro_10/index-3_columns.php) [function.file]: failed to open stream: No such file or directory in /home/stripper/public_html/celebquebec.com/wp-content/themes/metro_10/tools/post_templates.php on line 23
    Warning: implode() [function.implode]: Invalid arguments passed in /home/stripper/public_html/celebquebec.com/wp-content/themes/metro_10/tools/post_templates.php on line 23

    //This function scans the template files of the active theme,
    //and returns an array of [Template Name => {file}.php]
    if(!function_exists('get_post_templates')) {
    function get_post_templates() {
    	$themes = get_themes(); //an array of all themes in the /themes directory
    	$theme = get_current_theme(); //the current, active theme
    	$templates = $themes[$theme]['Template Files']; //a list of all the current theme's template files
    	$page_templates = array ();
    
    	foreach ((array)$templates as $template ) { //this loop returns all the "post templates"
    		$template_data = implode( '', file( WP_CONTENT_DIR.$template ));
    		$name = '';
    		if ( preg_match( '|Single Post Template:(.*)$|mi', $template_data, $name ) ) { $name = $name[1]; }
    		if ( !empty( $name ) ) { $post_templates[trim( $name )] = basename( $template ); }
    	}
    	return $post_templates; //return the array of Post Templates
    }}
Viewing 3 replies - 16 through 18 (of 18 total)
  • t31os_ ‘s advice worked for me too.

    NOTE: EDIT WITHIN YOUR HOSTING CONTROL PANEL!!!!!!!! it makes this so much easier.

    booyah.

    Help is needed please. I have just upgraded and get this message all over my admin pages:

    Warning: file(/home/ukh32946/public_html/wp-content/home/ukh32946/public_html/wp-content/themes/metro_10/search.php) [function.file]: failed to open stream: No such file or directory in /home/ukh32946/public_html/wp-content/themes/metro_10/tools/post_templates.php on line 23

    Warning: implode() [function.implode]: Invalid arguments passed in /home/ukh32946/public_html/wp-content/themes/metro_10/tools/post_templates.php on line 23

    I don’t see where I can edit this:

    The problem is this line here, it’s setting an incorrect path.
    $template_data = implode( ”, file( WP_CONTENT_DIR.$template ));
    Try updating that to..
    $template_data = implode( ”, file( $template ));
    Not sure it will help, but worth a shot i guess.

    I would appreciate some assistance.

    Sam

    I did it!! Very proud of myself. Changed as per instructions above through FTP.

    Sam

Viewing 3 replies - 16 through 18 (of 18 total)

The topic ‘Warning: implode() [function.implode]:’ is closed to new replies.