• ( Chrome/firefox browsers only debugged for the moment )

    I have developed a template which works on my development server. rentdirect.umfundi.com/about-rentdirect works as expected. I moved my theme to a new server and things have gone a little awry.
    proptest.uyunigroup.com/about-rentdirect does not display the content of the about-rentdirect page.

    I have traced this to a call to get_template_part in the page template.

    while (have_posts()) {
    the_post();
    get_template_part(‘content’, ‘page’);
    }

    everything up to the get_template_part call happens as expected then nothing.

    1 – My theme contains a file …./libraries/legacy.php with a copy of the get_template_part function defined in it. This version is not being used by WP. The function is served by the original definition in the WP general-template.php file.

    2 – regardless of the above WP does not display the post content.

    I have been through the codex and forums and discovered a few tanatlizing leads with respect to scope of variables ( why is it different on this server as opposed to the original development one? )
    i suspect that WP is not fully reading my template files ( but i could be wrong )

    Any pointers as to where to go next would be greatly appreciated since I can’t stomach too much more coffee and i gave up smoking a long while ago!.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter nimbusgb

    (@nimbusgb)

    more info …

    creating a new arbitrary page ‘my test page’ https://proptest.uyunigroup.com/my-test-page on the new server doesn’t make any difference so my thought that it might be something to do with page id’s /slugs was off the mark.

    Thread Starter nimbusgb

    (@nimbusgb)

    commenting out the call to the get_template part allows the page to complete and the footer block is displayed so now I’m thinking ‘back to the scope of the variables’ if the content of the post is not getting to the template then I’d expect an empty display. ( does this also explain why nothing after the call is processed? the calls to the footer that follow are never made! ) hmmm off to the log files i think

    Thread Starter nimbusgb

    (@nimbusgb)

    ahhh a glimmer of illumination at the end of the tunnel!

    logs – Call to undefined function mb_strlen() in function …….

    multibyte strings not enabled on this server, why is my template using mb stings? hmm built in artisteer 3 originally ??

    Thread Starter nimbusgb

    (@nimbusgb)

    original artisteer theme uses several mb_ functions so i guess it’s off to the artisteer site ….

    Thanks … been nice talking to myself ??

    Haha. Amazing what you can do once you realize no-one else out there is going to help you with your problems.

    Remember PHP error reporting and if(function_exist(‘..’)) when working with PHP.

    Cheers,
    M

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘get_template_part in template not working’ is closed to new replies.