Aloha,
Habe ein Problem mit einem Woo-Theme.
Also es soll was inkludiert werden. Doch folgende Fehlermeldung wird angezeigt:
ZitatWarning: include(layouts/*.php) [function.include]: failed to open stream: No such file or directory in /usr/export/www/vhosts/funnetwork/hosting/zerotation/Photoblog/wp-content/themes/snapshot/single.php on line 15
Warning: include() [function.include]: Failed opening 'layouts/*.php' for inclusion (include_path='.:') in /usr/export/www/vhosts/funnetwork/hosting/zerotation/Photoblog/wp-content/themes/snapshot/single.php on line 15
Der PHP Code der inkludieren will ist die "single.php"
Siehe hier:
<?php get_header(); ?>
<div id="content" class="fullspan">
<div class="container_16 clearfix">
<div id="leftcontent" class="grid_12 alpha">
<?php while (have_posts()) : the_post(); ?>
<?php
$layout = get_option('woo_layout');
include('layouts/'.$layout);
?>
<?php endwhile; ?>
<div style="clear:both;height:15px;"></div>
<div id="comments">
<?php comments_template(); ?>
</div>
<div id="postnav">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div><!-- /postnav -->
</div><!-- /leftcontent -->
<?php get_sidebar(); ?>
</div><!-- /container_16 -->
</div><!-- /content -->
<?php get_footer(); ?>
Alles anzeigen
Und das sind die Codes, die inkludiert werden sollen:
Dieser hier funktioniert nicht, ich weiß nich wo ran es liegt.
(Dieser hier heißt "1-photo.php")
<div class="grid_12 alpha">
<div class="post">
<h2><?php the_title(); ?></h2>
</div><!-- /post -->
</div>
<div class="grid_12 alpha">
<div class="large-screenshot">
<div class="large-screenimg">
<?php if ( get_option('woo_resize') ) { woo_get_image('large-image','690','396'); } else { ?>
<img src="<?php echo get_post_meta($post->ID, "large-image", $single = true); ?>" alt="<?php the_title(); ?>" />
<?php } ?>
</div><!-- /screenimg -->
</div><!-- /screenshot-->
</div>
<div style="clear:both;height:15px;"></div>
<div class="grid_6 alpha">
<div class="post">
<h3>Photo Information</h3>
<p class="date"><strong>Submitted on:</strong> <?php the_time('d M y'); ?></p>
<p><strong>Category:</strong> <?php the_category(','); ?></p>
<p><strong>Photo Rating:</strong> <?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>
</div><!-- /post -->
</div><!-- /grid_6 omega -->
<div class="grid_6 omega">
<div class="post">
<h3>Author's Description:</h3>
<?php the_content(); ?>
</div><!-- /post -->
</div><!-- /grid_6 omega -->
Alles anzeigen
Dieser Code hier allerdings Funktioniert, er soll ebenfalls inkludiert werden:
(Dieser hier heißt "2-gallery.php")
<div class="grid_6 alpha">
<div class="post">
<div class="screenshot">
<div class="screenimg">
<?php if ( get_option('woo_resize') ) { woo_get_image('large-image','330','190','url'); } else { ?>
<a href="<?php echo get_post_meta($post->ID, "url", $single = true); ?>" target="_blank" title="View <?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" /></a>
<?php } ?>
</div><!-- /screenimg -->
</div><!-- /screenshot-->
</div><!-- /post -->
</div><!-- /grid_6 omega -->
<div class="grid_6 omega">
<div class="post">
<h2><?php the_title(); ?></h2>
<p class="date"><strong>Submitted on:</strong> <?php the_time('d M y'); ?></p>
<p><strong>Website Address:</strong> <a title="<?php the_title(); ?>" href="<?php echo get_post_meta($post->ID, "url", $single = true); ?>" target="_blank" rel="bookmark"><?php echo get_post_meta($post->ID, "url", $single = true); ?></a> </p>
<p><strong>Category:</strong> <?php the_category(','); ?></p>
<p><strong>Website Rating:</strong> <?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>
</div><!-- /post -->
</div><!-- /grid_6 omega -->
<div style="clear:both;height:15px;"></div>
<div>
<h3>Author's Description:</h3>
<?php the_content(); ?>
</div>
Alles anzeigen
Die beiden PHP-Codes die hier inkludiert werden sollen befinden sich im Ordner "layouts"
Und dieser Code hier, nennt sich "Custom.php" und ist für die Funktionisweiße zuständig oder nicht?
<?php
// Custom fields for WP write panel
// This code is protected under Creative Commons License: http://creativecommons.org/licenses/by-nc-nd/3.0/
$wt_metaboxes = array(
"image" => array (
"name" => "image",
"default" => "",
"label" => "Screenshot (330x190)",
"type" => "text",
),
"large-image" => array (
"name" => "large-image",
"default" => "",
"label" => "Large Image (Max Width: 690px)",
"type" => "text",
),
"url" => array (
"name" => "url",
"default" => "",
"label" => "Website URL",
"type" => "text",
),
);
function woothemes_meta_box_content() {
global $post, $wt_metaboxes;
echo '<table>'."\n";
foreach ($wt_metaboxes as $wt_metabox) {
$wt_metaboxvalue = get_post_meta($post->ID,$wt_metabox["name"],true);
if ($wt_metaboxvalue == "" || !isset($wt_metaboxvalue)) {
$wt_metaboxvalue = $wt_metabox['default'];
}
echo "\t".'<tr>';
echo "\t\t".'<th style="text-align: right;"><label for="'.$wt_metabox.'">'.$wt_metabox['label'].':</label></th>'."\n";
echo "\t\t".'<td><input size="50" type="'.$wt_metabox['type'].'" value="'. stripslashes($wt_metaboxvalue).'" name="woothemes_'.$wt_metabox["name"].'" id="'.$wt_metabox.'"/></td>'."\n";
echo "\t".'</tr>'."\n";
}
echo '</table>'."\n\n";
}
function woothemes_metabox_insert($pID) {
global $wt_metaboxes;
foreach ($wt_metaboxes as $wt_metabox) {
$var = "woothemes_".$wt_metabox["name"];
if (isset($_POST[$var])) {
add_post_meta($pID,$wt_metabox["name"],$_POST[$var],true) or update_post_meta($pID,$wt_metabox["name"],$_POST[$var]);
}
}
}
function woothemes_meta_box() {
if ( function_exists('add_meta_box') ) {
add_meta_box('woothemes-settings','Additional Fields (Optional)','woothemes_meta_box_content','post','normal');
add_meta_box('woothemes-settings','Additional Fields (Optional)','woothemes_meta_box_content','page','normal');
}
}
add_action('admin_menu', 'woothemes_meta_box');
add_action('wp_insert_post', 'woothemes_metabox_insert');
?>
Alles anzeigen
Dieser Code befindet sich im Ordner "functions"
Hier so wie es bei mir aussieht: Hello�|�Zerotation – New Young Photography
Auf dieser Seite soll "1-photo.php" inkludiert werden, wie man sieht funktioniert das nicht.
Und so sieht es im Demo aus: Secret�|�Snapshot by WooThemes
Auf dieser Seite funktioniert der "1-photo.php" Code.
Ich bin ratlos, denn das ist das erste mal das ich was mit PHP zutun habe.
Kann mir jemand helfen?
lg