在谷歌搜索之后,我发现了很多这样的结果。
搜索:<a href="<? php the_permalink()" /> <?php the_title()?> </a>
在single.php或page.php或index.php的主题目录。
没有办法我可以找到(只是寻找标题,而不是整个句子)。
我正在使用快餐主题,我一直在寻找single.php, page.php和index.php(所有这些文件都是1或2Kb,所以我没有办法在我的搜索失败。
" C:……'apache2'htdocs'wordpress'wp-content'themes'fastfood''这是我查看的目录。
有谁知道我要查哪个文件/目录吗?
感谢大家的宝贵时间。
编辑:没有在header.php中,但足够接近:
在functions.php
中找到称为fastfood_featured_title
的函数。修改以下行:
if ( $post_title || $thumb ) $post_title = '<h2 class="' . $title_class . '"><a title="' . $args['title'] . '" href="' . $args['href'] . '"' . $link_target . ' rel="bookmark">' . $thumb . $post_title . '</a></h2>';
:
if ( $post_title || $thumb ) $post_title = '<h2 class="' . $title_class . '">' . $thumb . $post_title . '</h2>';
如果您使用的是Linux或MacSOX,您可以使用find
命令,打开终端,进入主题文件夹并键入
find . -type f -name '*.php -print0 | xargs -0 grep -i the_title()
你会看到the_title()
在哪里被使用,然后你可以修改它
对于Windows -我真的不知道,检查链接:http://msdn.microsoft.com/en-us/library/017ybd7t(v=VS.80).aspx
编辑
在windows中find
的替代品似乎是findstr
,试试像
FINDSTR/s/i the_title() *.php