Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Child theme: using hooks vs modifying single.php « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Child theme: using hooks vs modifying single.php

(2 posts)
  • Started 4 years ago by McSalty
  • Latest reply from Danieliser
  • This topic is not resolved

  1. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    McSalty

    Member

    I'm currently designing a heavily-customized child theme for thematic for a website with information about restaurants. I'm doing a 3 box layout, similar to this theme's home page: demo.woothemes .com/delegate/ (Remove the spaces in the URL -- the forum won't let me post the link with a space. Anyway, the layout is: slider at top, two columns below).

    There are two types of pages on my website. Each has the same layout, but different content within each section.

    1) Home page, restaurant search pages (by food type, price range, etc):
    - Full-width box at top displays introduction to website
    - Left column displays list of restaurants (posts)
    - Right column displays sidebar

    2) Restaurant listing (single post)
    - Full-width box at top displays the post
    - Left column displays restaurant's menu listing (using a custom post type)
    - Right column displays other data obtained from custom fields (hours, contact, map, etc)

    The problem is, in the two different types of pages, the loop needs to be called at different points -- in 1) we need to call the loop from the left column, while in 2) the loop must be called from the top full-width box. (Hopefully that makes sense.)

    Normally I'd just custom-code single.php, but I'm new to thematic and am trying to do things "the right way" by using filters and action hooks. Can anyone think of a smart way to set up the website to satisfy these needs? Or is it more effort than it's worth, and should I just make a new single.php in the child-theme?

    Thanks.

    Posted 4 years ago #
  2. Danieliser
    Member

    In a lot of instances you can use hooks and filters, but sometimes its best to just bite the bullet and create a custom template. If you are using custom post types then you can create a new file 'single-restaurant.php' for Custom Post Type of restaurant.

    Otherwise you can use stuff like the childtheme_override_singlepost() function. If defined replaces the singlepost function.

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183