这是家里的密码。php:
<?php get_header(); ?>
<div class="pikachoose">
<ul id="pikame" >
<?php
$cat1 = stripslashes(get_option(\'lx_feat_cat\'));
//The Query
query_posts(\'category_name=\'. $cat1 . \'&showposts=9\');
//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();
$link = get_permalink( $post->ID );
?>
<li>
<a href="<?php echo $link ?>">
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail(\'thumbnail-home\');
}
?></a>
<div class="slide">
<?php $slide_title = get_the_title(); ?>
<h1 class="title-slider clean"><?php _e($slide_title, lexington-theme); ?></h1>
<?php the_excerpt(); ?>
</div>
</li>
<?php endwhile; endif;
//Reset Query
wp_reset_query();
?>
</ul>
</div>
我想将get\\u the\\u title替换为一个自定义标题和一个自定义的幻灯片标题。我想我可以用我的自定义标题和练习创建两个数组,并从数据库中提取它们,而不是那些:<?php
$get_the_title() = "Custom title 1";
$get_the_title() = "Custom title 2";
$get_the_title() = "Custom title 3";
etc for 9 slides..
$the_excerpt() = "Custom exerpt 1";
$the_excerpt() = "Custom exerpt 2";
etc...
我的角度将$get\\u the\\u title()替换为$get\\u the\\u title\\u自定义[$链接],但运气不好。由于对php不太熟练,我无法在不破坏某些东西的情况下想出如何做到这一点。任何帮助都将不胜感激。