• I have built a custom front end for my WP install using the:

    define('WP_USE_THEMES', false);
    
    /** Loads the WordPress Environment and Template */
    require './wp/wp-blog-header.php';

    And I am using:

    $content = apply_filters( 'the_content', get_the_content() );
             $content = str_replace( ']]>', ']]>', $content );
    
             //the_content();
             echo $content;

    to output posts and pages.

    But I cannot figure out how to get the css formatting of the posts to work right.

    Do I need to link to some CSS files in /wordpress or can I also use body_class(); somehow?

    I am totally lost regarding this.

    Any help appreciated.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I’ve never run a front end this way (child theme is easier IMO), but I imagine you still need to enqueue your CSS just as a normal theme would for styles beyond style.css. This is done with wp_enqueue_style(). Hope this helps, good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Problem formatting posts in custom front-end.’ is closed to new replies.