WordPress.org

Support

Support » Themes and Templates » Template not bringing in CSS styling

Template not bringing in CSS styling

  • Goonky
    Member

    @goonky

    Hello all,

    I took my first shot at creating my own template page today to pull in some php. Someone else wrote the php code that I was pulling in – I am not fluent in php at all.

    Overall, I’m pretty excited that I got it running though by using a template file. I’m currently using a plugin and would like to get away from that.

    Anyway, the page is working except for one thing – it didn’t seem to bring in the style sheet.

    Here’s the page:

    http://thepracticeroom.net/big-test

    Here’s the mark up on my template page:

    <?php
    /*
    Template Name: example-test
    */
    ?>
    <?php get_header(); ?>
    
    <div id="content_area" class="clearfix fullwidth">
    	<div id="main_content">
    		<?php get_template_part('includes/breadcrumbs','index'); ?>
    		<?php get_template_part('loop','page'); ?>
    		<?php include (TEMPLATEPATH . '/example-test.php')?>
    	</div> <!-- end #main_content -->
    </div> <!-- end #content_area -->
    
    <?php get_footer(); ?>

    Here’s what it’s supposed to look like:

    http://thepracticeroom.net/free-trial

    It’s got to be something simple right? What do I need to do to bring in the stylesheet around the main content?

    Any help appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi
    Forum Moderator

    @esmi

    I can see the CSS on that test page. That said, you shouldn’t be using <?php include (TEMPLATEPATH . '/example-test.php')?>. The TEMPLATEPATH constant is for WP internal use only and shouldn’t be used in a theme. Try replacing it with: <?php get_template_part('example','test'); ?>.

    Andrew Nevins
    Forum moderator

    @anevins

    It looks like the stylesheet is there, however the plugin that used to control the shortcodes, such as [box type="info"] are no longer active.

    Goonky
    Member

    @goonky

    Ah, yes. I wasn’t speaking correctly with the terminology. It’s the shortcodes that aren’t coming in.

    This theme is from elegant themes. The short codes are generated by the theme, not a plugin.

    Should I be taking my question to their forum?

    Thank you very much for the help.

    esmi
    Forum Moderator

    @esmi

    Should I be taking my question to their forum?

    As this is a commercial theme, yes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Template not bringing in CSS styling’ is closed to new replies.