Support » Plugin: Multiple content blocks » Issue displaying Content Block

  • Resolved 83creative



    I love this plugin, use it on nearly all my projects.

    I have run across an issue I am having with it though, which hopefully somebody can shed some light on.

    I have placed the template tag for this plugin in my header.php template file. Basically I am using it to display a custom message over an image in the header.

    This works beautifully on every page apart from the blog page. In settings -> reading — I have static home page set to a page template, and I have created a page called blog, which loads up the main blog index.

    The content block editor does not appear when I go into that blog page.

    Is this because in reality this page doesn’t exist? It is working on all my other pages even on individual blog posts, just the blog page which isn’t working?

    As this is setup in my header.php file I am not going to be able to hard code the message in for that one page, so I need a solution if this is possible or not.

    Please let me know.



Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Trendwerk


    Hi Dan,

    I see. WordPress is changing the default loop in that template. Since MCB relies on $post, it doesn’t work. The only workaround that I can think of is something like this:

    $page = get_page_by_title( 'Blog' ); //Or whatever your blog page is called
    $block = get_post_meta( $page->ID, '_mcb-{your-block-name}', true ); //Fill in your block name (sanitized)
    echo $block;

    Should be something like that. You can also get the post meta manually in these situations.




    Thanks for getting back to me. I will give it a go and see if I can get it to work.

    What do you mean by “You can also get the post meta manually in these situations?”

    Cheers for the quick response. Keep up the good work with the plugin. Love it!

    Plugin Author Trendwerk


    I meant that the data is saved in the wp_postmeta table. So there’s always a way to retrieve the data in specific situations 🙂

    By the way, this bug is on our issue list, so we’ll fix this some time in the future.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issue displaying Content Block’ is closed to new replies.