Grow your CSS skills. Land your dream job.

WordPress Starkers Utilites::get_template_parts Problems Loading Parts

  • # March 23, 2013 at 7:39 am

    Hi,
    I have been developing a theme for WordPress for a couple of days now using Starkers Blank Theme.
    I have been using the starkers utilities to insert template parts. I discovered a problem when I tried to load to parts after each other.

    < ?php Starkers_Utilities::get_template_parts( array( 'parts/shared/sidebar','parts/shared/html-sidebar') ); ?>
    < ?php Starkers_Utilities::get_template_parts( array( 'parts/shared/footer','parts/shared/html-footer' ) ); ?>

    When I run this code, it only ever displays the sidebar. Strangely, if I set them to call the same part twice. It displays how you would expect. The other strange thing I found was that if I load them the other way around. It also displays how you would expect. I believe it may be something to do with my html-sidebar.php file which simply contains this:
    “< ?php wp_sidebar(); ?>“

    My sidebar.php file contains nothing but HTML.

    I was not sure if this was the correct way to call the sidebar.php, however it seemed to work. Does anyone know a solution to my problem.

    Thanks

    # March 23, 2013 at 11:14 am

    Solved it by myself.

    Anonymous
    # April 5, 2013 at 12:39 pm

    How did you solve it, George Arnall? You could at least show the courtesy to share your solution. Only then you could mark this as “solved”, as there would be a solution in that topic.

    # April 5, 2013 at 12:41 pm

    I didn’t need to add the < ?php wp_sidebar() ?> in html_sidbar.php. So this file is blank.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".