U ka kenyelletsa URL ea sengoloa see joang qetellong ea sengoloa sa WordPress? Khoutu ea PHP ea mantlha ea WP

Mokhoa oa hoWordpressKenya sehokelo ho mongolo oa mantlha qetellong ea sengoloa ka seng ho?

U ka kenyelletsa URL ea sengoloa see joang qetellong ea sengoloa sa WordPress? Khoutu ea PHP ea mantlha ea WP

sebedisaWebosaete ea WordPressmetsoalle ea , haeba u batla ho eketsa "Haeba sengoloa sa mantlha se hlahisitsoe hape, ka kopo bonts'a sehokelo sa sengoloa sena:”, e hlileng e leng bonolo.

Mona ke mekhoa ea 2 ea ho kenyelletsa URL ea sehokelo ho sengoloa sena qetellong ea poso ea hau ea WordPress.

?? Ntlha ea pele, fetola thempleite ea leqephe la sengoloa single.php

Ho faele ea template ea sehlooho sa WordPress, bula single.php 'me u batle khoutu e latelang ea PHP:

<?php the_content(); ?>

Ka tlase ho mola ona oa khoutu ea PHP, eketsa khoutu e latelang ea PHP▼

<p>原创文章如转载,请注明本文链接: <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_permalink(); ?></a></p>
  • Ebe, boloka apdeite 'me ke phetho.

??Ya bobedi, kenya khoutu ya PHP faeleng ya function.php

Mokhoa ona o khothaletsoa, ​​eseng feela ho kenya likhokahano ho maqephe a log log, empa hape le ho kenyelletsa lijo.

Bula faele ea function.php foldareng ea sehlooho 'me u kenye khoutu e latelang ea PHP qetellong (hlokomela matšoao a Sechaena le Senyesemane ha u kopitsa le ho peista):

<?php
function feed_copyright($content) {
if(is_single() or is_feed() or is_page()) {
$content.= '<div>    » 本文来自:<a title="陈沩亮博客" href="https://www.chenweiliang.com/" target="_blank">陈沩亮博客</a> » <a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'" target="_blank">《'.get_the_title().'》</a></div>';
$content.= '<div>    » 本文链接地址:<a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'" target="_blank">'.get_permalink().'</a> »英雄不问来路,转载请注明出处,谢谢。</div>';
$content.= '<div>    » 有话想说:<a title="给我留言" href="'.get_permalink().'#respond" target="_blank">那就赶紧去给我留言吧.</a></div>';
$content.= '<div>    » 欢迎加入陈沩亮博客的 Telegram 频道:<a rel="external nofollow" title="点此加入陈沩亮博客的 Telegram 频道" href="" target="_blank">https://www.chenweiliang.com/go/tgchannel</a></div>';
}
return $content;
}
add_filter ('the_content', 'feed_copyright');
?>
  • Ka kopo e fetole ho latela blog ea hau ea WordPress.

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) o ile a arolelana "U ka kenya URL ea sehlooho see joang qetellong ea sehlooho sa WordPress? Khoutu ea pele ea WP ea PHP", e leng thuso ho uena.

Rea u amohela ho arolelana sehokelo sa sengoloa sena:https://www.chenweiliang.com/cwl-1498.html

Rea u amohela ho mocha oa Telegraph oa blog ea Chen Weiliang ho fumana lintlha tsa morao-rao!

🔔 Eba oa pele oa ho fumana Tataiso ea Tšebeliso ea "ChatGPT Content Marketing AI" ea bohlokoa bukeng ea holimo ea seteishene! 🌟
📚 Tataiso ena e na le boleng bo boholo, 🌟Ona ke monyetla o sa tloaelehang, se ke oa o fetoa! ⏰⌛💨
Share le rata haeba u rata!
Ho arolelana le lintho tseo u li ratang ke khothatso ea rona e tsoelang pele!

 

Comments

Aterese ea hau ea lengolo tsoibila e ke ke ea phatlalatsoa. Ho sebelisoa masimo a hlokahalang * Letšoao

tsamaisetsa hodimo