Support » Themes and Templates » create div tag within a php tag

  • Hi there

    Can someone please help me. Digital raindrops created a page template called page-pop.php. The loop looks like this

    <?php endif;
    while ( $wp_query->have_posts() ) :
    switch ( $list_style ) {very long coding, in short get_post_format or custom post formats}
    else : ?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

    I want to put a div around “switch ( $list_style ) {}” as I want to incoperate a CSS grid style. The css grid works perfectly when you put a div around <?php get_template_part( ‘content’, get_post_format() ); ?> in index.php.

    Any help will do.

    Many thanks

  • The topic ‘create div tag within a php tag’ is closed to new replies.