• pietergoosen

    (@pietergoosen)


    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() ) :
    $wp_query->the_post();
    
    switch ( $list_style ) {very long coding, in short get_post_format or custom post formats}
    endwhile;
    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.