How can make content editable Wordpress

2019-09-24 16:03发布

I am working on wordpress site, I want to make all pages content editable from backend i.e admin panel,every page site have many sections so not easy to handle only with page content area. What is the most easiest and preferable way to make all content editable.

标签: wordpress
1条回答
三岁会撩人
2楼-- · 2019-09-24 17:00

add page in the admin panel with the contents that you needed to show in the front page. then using the page ID you can get the contents in your template page.

<?php 
$id=47; 
$post = get_post($id); 
$content = apply_filters('the_content', $post->post_content); 
echo $content;  
?>
查看更多
登录 后发表回答