define('DISALLOW_FILE_EDIT', true); define('DISALLOW_FILE_MODS', true); /dev/head — WordPress text widget with text from post

WordPress text widget with text from post

  • install plugin Enhanced Text Widget;
  • add code in Enhanced Text Widget textarea;

<?php
$my_postid = 22; //id your post
$content_post = get_post($my_postid);
$content = $content_post->post_content;
$content =apply_filters('the_content',$content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>

Теги: , ,

Дата: 6 июня 2014

Автор: Аноним

Комментарии: 451