ThemeShaper Forums » Development Talk

[closed]

Widget Page template

(10 posts)
  • Started 5 years ago by cooksr
  • Latest reply from helgatheviking
  1. cooksr
    Member

    I am not a developer, so please bear with me(I'm in the web dark ages here).

    I am working on a WP site for an animal rescue group. I need to set it up so that they add all news and adoptable animals as individual posts, and then the posts, based on category, will show on specific pages(example: available dogs vs News pages). I found a way to do it here:
    Query Posts Widget Plugin + Widgetized Page Template + Widget Logic = WordPress Gold

    It's my first time working with a child theme (Street) and I really like the Thematic framework much more than Hybrid for what I'm creating. But, the tutorial suggests Hybrid because it provides a Widget Page template that lets me work with Query posts and Widget logic to create these unique pages of filtered posts.

    I'd like to stick with Thematic. Is there a relatively painless way to replicate the same thing with Thematic-remembering that I am not a developer? Thanks!

    Posted 5 years ago #
  2. Will look into this thing.

    Chris

    Posted 4 years ago #
  3. Hey cooksr and Chris,

    I'm the guy behind that tutorial, however, I haven't toyed with making a widgetized page template in Thematic. I'd be very interested to see what Chris would suggest here.

    On the other hand, cooksr, you could make individual page templates and on each of these pages you would hard code a category loop that pulls from whatever category you choose.

    http://codex.wordpress.org/Template_Tags/wp_list_categories (scroll to the examples)

    Posted 4 years ago #
  4. I know :)

    Ok .. will put it on my list.

    Chris

    Posted 4 years ago #
  5. I would also love to see a wigetized page template for thematic. i know little about it but it seems to would speed development time. is it hard to make? it seems in some cases it would be more efficient - if you had many pages you would not need a new template for each one and if you wanted ot edit the template you could edit just the wigetized one and it would effect all the pages.

    Posted 4 years ago #
  6. rdhenry
    Member

    I take it this idea's been dropped?

    Posted 4 years ago #
  7. Piping up here as well to add my vote for a widgetized page template.

    Posted 4 years ago #
  8. It is very time consuming building widgetized template and I could not find a widgetized templates for Themeshaper. Even the function to collapse widgets is not easy to implement because then you have to change also the CSS.

    I am thinking to do next template with Joomla, now with Joomla 1.6 there is a lot of improvement to make easier templates with different sections and layouts. Finally, you have total control over widgetized areas called modules in Joomla which collapse if they are empty. It is better if you need personalized templates and areas for each section of your website.

    Posted 3 years ago #
  9. ummm this isn't hard at all. create a page template, add a new hook, define widget area (easily found on this forum), define hook, attach widget to said hook. presto-bravo... widgetized template. (or you could probably use an existing hook and conditional logic, but whatevs)

    take a look at Justin Tadlock's Hybrid for an example. i'm going to bed now, but i will try to remember to post something more tomorrow.

    Posted 3 years ago #
  10. here's my template:

    <?php
    /**
     * Template Name: Widgets Template
     *
     * This template shows all the widgets in the 'Widgets Template Widget' after the content
     *
     */
    
        // calling the header.php
        get_header();
    
        // action hook for placing content above #container
        thematic_abovecontainer();
    
    ?>
    
    		<div id="container">
    
    			<?php thematic_abovecontent();
    
    			echo apply_filters( 'thematic_open_id_content', '<div id="content">' . "\n" );
    
    				// calling the widget area 'page-top'
    	            //get_sidebar('page-top');
    
    	            //the_post();
    
    	            thematic_abovepost();
    
    	            widgets_template_area_aside();
    
    				thematic_belowpost();
    
    	        // calling the comments template
           		if (THEMATIC_COMPATIBLE_COMMENT_HANDLING) {
    				if ( get_post_custom_values('comments') ) {
    					// Add a key/value of "comments" to enable comments on pages!
    					thematic_comments_template();
    				}
    			} else {
    				thematic_comments_template();
    			}
    
    	        ?>
    
    			</div><!-- #content -->
    
    			<?php thematic_belowcontent(); ?> 
    
    		</div><!-- #container -->
    
    <?php 
    
        // action hook for placing content below #container
        thematic_belowcontainer();
    
        // calling the standard sidebar
        thematic_sidebar();
    
        // calling footer.php
        get_footer();
    
    ?>

    and the functions.php stuff to set up that new widget area:

    //Re-define Widget Areas
    function new_widgetized_area($content) {
    
    		$content['Widget Template Aside'] = array(
    			'admin_menu_order' => 900,
    			'args' => array (
    				'name' => 'Widget Template',
    				'id' => 'widget-template-aside',
                    'description' => __('A widget area that replaces the content Widgets page template.', 'thematic'),
    				'before_widget' => thematic_before_widget(),
    				'after_widget' => thematic_after_widget(),
    				'before_title' => thematic_before_title(),
    				'after_title' => thematic_after_title(),
    				),
    			'action_hook'	=> 'widgets_template_area_aside',
    			'function'		=> 'widgets_template_aside',
    			'priority'		=> 1,
    			);
    
    	return $content;
    }
    add_filter('thematic_widgetized_areas', 'new_widgetized_area');
    
    //define action hook for the Widgets Template Aside
    // Located in template-page-widget-page.php
    	function widgets_template_area_aside() {
    	    do_action('widgets_template_area_aside');
    	} // end widgets_template_area_aside
    
    // Define the Widgets Template Aside
    function widgets_template_aside() {
    	if (is_active_sidebar('widget-template-aside')) {
    		echo thematic_before_widget_area('widget-template-aside');
    		dynamic_sidebar('widget-template-aside');
    		echo thematic_after_widget_area('widget-template-aside');
    	}
    }

    I would be interested to hear thoughts on whether Thematic should add/remove some of its widget areas. i find myself constantly deleting all the content widget areas on client sites b/c the widgets page looks so daunting w/ 12. is anyone using those? i also borrowed the idea of a 404 widget area from Hybrid too. both the 404 and widgets page seem a lot more useful than single-top, single-bottom, single-insert,etc.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.