![](/img/trans.png)
[英]Removing the title post in wordpress so I can use it as a static CMS
[英]removing hyperlink title - wordpress
谷歌搜索后,我發現了很多類似的結果。
搜索: <a href="<? php the_permalink()" /> <?php the_title()?> </a>
在主題目錄中的single.php或page.php或index.php中。
我找不到方法(只是尋找標題,而不是整個句子)。
我使用的是Fastfood主題,而且我一直在尋找single.php,page.php和index.php(所有這些文件均為1或2Kb,因此Im不會在搜索中失敗。
'C:... \\ apache2 \\ htdocs \\ wordpress \\ wp-content \\ themes \\ fastfood \\'這是我正在看的目錄。
有人知道我必須查看哪個文件/目錄嗎?
謝謝您的寶貴時間。
編輯:都不在header.php中,但足夠接近:
如果您使用的是Linux或MacSOX,則可以使用find
命令,打開終端,進入主題文件夾並鍵入
find . -type f -name \*.php -print0 | xargs -0 grep -i the_title()
您將看到the_title()
的使用位置,然后可以對其進行修改。
使用Windows –我不太了解,請檢查該鏈接: http : //msdn.microsoft.com/zh-cn/library/017ybd7t (v=VS.80) .aspx
在Windoze中, find
的替代方法似乎是findstr
,嘗試類似
FINDSTR / s / i the_title()* .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>';
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.