WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Adding cfs code to template breaks template

[Resolved] Adding cfs code to template breaks template

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Matt Gibbs

    @mgibbs189

    Please paste your entire template code to pastebin.com. I need to see your code in order to help diagnose.

    I discovered that it doesn’t work in the default nested-template structure of Twenty Eleven, as in <?php get_template_part( 'content', 'single' ); ?>

    When i put cfs code in content-single.php, I get the errors. However, if I delete that php and move all my content code into the parent single.php it works as advertised.

    Plugin Author Matt Gibbs

    @mgibbs189

    Right, templates called using get_template_part don’t recognize the $cfs variable, hence the need to add <?php global $cfs; ?> at the top of your file.

    Yes, but do I add it to the php file that contains get_template_part? If I add it to the template part, I get the error.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Adding cfs code to template breaks template’ is closed to new replies.