• Sometimes, when WordPress just isn’t powerful enough, I often use ExpressionEngine as CMS for my clients. Actually EE is my preferred CMS, just to be completely honest.

    Anyway, there’s a plugin for EE, called Matrix, developed by Brandon Kelly, which is essential for many types of sites.

    With some javascript, Matrix allows custom field placement inside a data table, where you can add, subtract and reorder rows with the click of a button. It’s amazing how easy it is to add all sorts of custom fields per cell.

    As far as I know, I’ve never seen this type of plugin, which allows this kind of functionality, without creating extra unnecessary fields in the administration panel (custom post types, using custom fields etc).

    My plugin skills are rather sparse, but I would gladly pay for this kind of functionality (actually, that’s what I do when using EE). Am I the only one missing this functionality? Everybody seems to love the new custom post type functionality, but a huge downside for me is that you have to custom code every field and fieldtype.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    I have answer to an unresolved post by you. That one regarding dynamic sidebars. I had the same issue in the morning today and I solved it, so thought better posts it here for others.

    The following code can help you define dynamic sidebars for every single page in wordpress. You can modify the SQL query for your needs.

    <?php

    // Creating a dynamic sidebar for each and every page.
    $temp_query = clone $wp_query;

    global $wpdb;
    global $post;

    $querystr = “
    SELECT wposts.*
    FROM $wpdb->posts wposts
    WHERE wposts.post_status = ‘publish’
    AND wposts.post_type = ‘page’
    AND wposts.post_date < NOW()
    ORDER BY wposts.menu_order ASC
    “;

    $pageposts = $wpdb->get_results($querystr, object);

    if ($pageposts):
    global $post;
    foreach ($pageposts as $post):
    setup_postdata($post);

    if ( function_exists(‘register_sidebar’) ) {

    register_sidebar(array(
    ‘name’ => $post->post_title,
    ‘before_widget’ => ‘ <div id=”menu_sub”><h3>Related Links</h3>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h3>’,
    ‘after_title’ => ‘</h3>’,
    ));
    }

    ?>

    <?php endforeach; ?>
    <?php else: ?>
    <?php endif; ?>
    <?php
    wp_reset_postdata();

    // Getting the original home page query back

    $wp_query = clone $temp_query;

    ?>
    <?php rewind_posts(); ?>

    The following code can be used in the sidebar to show each page’s respective sidebar

    <?php
    $post_obj = $wp_query->get_queried_object();
    $post_ID = $post_obj->ID;
    $post_title = $post_obj->post_title;
    $post_slug = $post_obj->post_name;
    if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) :
    dynamic_sidebar($post_title);
    endif;
    ?>

    Regards,
    Fahd Murtaza

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Suggestion for plugin: Data matrix’ is closed to new replies.