Multiple content blocks
[resolved] Blocks not showing up on Default Template (page.php) (2 posts)

  1. JboyJW
    Posted 3 years ago #

    Using WP 4.2, when I put the_block in a the header or page.php, the block does not show up when edit a page that is using the "Default Template".


  2. JboyJW
    Posted 3 years ago #

    Another glitch, perhaps due to WP version. The add_multiplecontent_box() function attempts to get the page template file name using $post->template. But for the Default Page, for some reason that returns page-sidebox.php instead of page.php... So I tried using the get_page_template() function instead and that seems to return the correct template file name for the Default Template and my custom templates.

    On line 39, replace
    $fileToRead = get_template_directory_uri().'/'.$post->page_template;
    $fileToRead = get_page_template();

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Multiple content blocks
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic