WordPress.org

Ready to get started?Download WordPress

Forums

Template not bringing in CSS styling (5 posts)

  1. Goonky
    Member
    Posted 1 year ago #

    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.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    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'); ?>.

  3. Andrew
    Forum Moderator
    Posted 1 year ago #

    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.

  4. Goonky
    Member
    Posted 1 year ago #

    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.

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    Should I be taking my question to their forum?

    As this is a commercial theme, yes.

Topic Closed

This topic has been closed to new replies.

About this Topic