0

I have the following issue. I'm using Visual Composer for my website content. I decided to rebuild my header with VC too. I created a page called Header and created the header template there/ I've added the following code into my header to display the created page content (Header) there:

<?php 
    $id=14; 
    $post = get_post($id); 
    $content = apply_filters('the_content', $post->post_content); 
    echo $content;  
?>  

But it doesn't work correctly. Everything is fine with its content (texts, links, menu items etc) but it doesn't display background colors, paddings etc. What should I do? Thanks!

Morgari
  • 524
  • 2
  • 8
  • 24
  • Please check below link. Hope this will help full. https://wordpress.stackexchange.com/questions/9667/get-wordpress-post-content-by-post-id – Bhoomi Apr 27 '18 at 11:46
  • Thanks, I saw this page recently. Unfortunately, I didn't find the solution for my case there. – Morgari Apr 27 '18 at 11:52
  • 1
    @Morgari could you `var_dump($content)` and post the output? – qskane Apr 27 '18 at 12:35
  • @qskane could you, please, provide some more information? What should I do? php is not my strong side :( – Morgari Apr 27 '18 at 15:01

0 Answers0