简体   繁体   中英

Wordpress: Include a post by title into theme index.php and don't display it in single.php

I want to display a "About me" Text on my index.php Wordpress page. I want to use the WYSIWYG editor from a posting. The text is paragraph and a ul/li.

  1. How do I include this posting by the title "About me" (without loosing all <\\br>? (I have tried get_page_by_title( $slug, OBJECT, 'post'); <- but this removes all "<\\br>"s).
  2. How do I prevent user/robots from visiting the posting "About me" via single.php?

效果很好: https ://de.wordpress.org/plugins/custom-post-widget/为此已注册的侧边栏。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM