ThemeShaper Forums » Thematic

[closed]

WP + Thematic best approach

(5 posts)
  • Started 4 years ago by ap0019er
  • Latest reply from flick
  • This topic is not resolved
  1. ap0019er
    Member

    I started playing with Thematic a couple of day ago. Looks like a great tool.

    I’m not sure however about how to approach my Wordpress implementation, while maintaining compatibility with future Thematic updates.
    I need to create a hierarchal Page (cannot use categories since I need some custom fields there) based navigation which is essential composed of 3 layers: Top of the hierarchy – Domain pages (the navigation menu is composed of these), second level – Projects, third level – Project subsections. The project pages and project subsections pages require to contain a Subsection navigation within that project.

    Now, in order to accomplish this I created two custom page templates for each type of page (project and subsection) and put them in the child theme directory. Within them I added the php code required to create the project navigation.

    Is this right? Won’t this kinda destroy the idea of upgrade compatibility (if the page.php file – on which the custom templates are based – changes in thematic future upgrades)? Should I have done this differently? (maybe using the child theme function.php file – dunno how however).

    Posted 4 years ago #
  2. Hi,

    if you could provide the code, I'm sure that this could be done using the functions.php.

    Chris

    Posted 4 years ago #
  3. ap0019er
    Member

    In the project-page.php template I add this part (to add the menu). In the subsection-page.php I add something similar that works with the page parent (since I need to get the siblings of the project to create the menu in the subpages).

    <?php
    	$pages = get_pages('child_of='.$post->ID.'&sort_order=ASC');
    	if ($pages)
    	{
    	    echo '<ul id="proj-nav">';
    	    $fist_section_name = __(strval(get_post_meta($post->ID, 'first_section', true)));
    	    echo '<li>'.$fist_section_name.'</li>';
        	foreach($pages as $page)
        	{
        	?>
                <li><?php if ($page->ID == $post->ID): ?>
                        <?php echo $page->post_title ?>
                    <?php else: ?>
                        <a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?></a>
                    <?php endif; ?>
                </li>
        	<?php
        	}
        	echo "</ul>";
    	}
    ?>

    In every other respect, the custom templates look like the original page.php.

    Posted 4 years ago #
  4. ap0019er
    Member

    I'm actually looking for a way to think about creating a theme based on thematic. How should I approach problems like this one, and still maintain upgrade compatibility.

    Posted 4 years ago #
  5. I'm intrigued by this as I haven't quite fully grasped how to create new page templates for Thematic as yet...

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.