Forums

How use filter for Multiple Content Blocks plugin (1 post)

  1. vytaulla51
    Member
    Posted 4 months ago #

    Hi:
    I'm using the plugin "Multiple Content Blocks" on a site I'm building (custom theme - business site, not a blog, uses static pages) and need to understand the following:
    in the readme.txt it has the this FAQ: How do I filter the content?, and it goes on:

    "Use the function get_the_block instead of the_block, like this: <?php $content_to_edit = get_the_block('blockname'); ?> and you can now edit this variable with PHP."

    In this site I'm using my page.php template for 6 pages, all of which will have different content in their right columns. The content isn't widget stuff and I didn't want to use "sidebars" - I think this plugin is perfect for what I want if I can filter it correctly.

    What I want to be able to do is name a block for each of the six pages, and then in the page.php template, be able to specify "if this page, use this block" but I don't know how to write it.

    So, for example, if one of the pages is called "customer", or ID 21, and I want to name the content block "contact", what do I write?

    Also, would it need to go inside the loop? In my page.php I have the loop above the colR (for column right) div.

    Thank You!

    Help greatly appreciated!

Reply

You must log in to post.

About this Topic

Tags