Grow your CSS skills. Land your dream job.

WordPress post – list style not working

  • # December 12, 2011 at 10:49 pm

    I just bought a wordpress theme and I am trying to customize it a bit. I know html and css fairly well but have not done much WordPress.

    When I post to the blog, the list button not not make the text into a list on the main blog page. It instead puts it in one line. Like so…

    item 1 item 2 item 3

    When i look at the html editor it says that it is indeed using html to specify a list.

    When I go to the “single” page it displays it correctly like so…

    item 1
    item 2
    item 3

    So I am trying to figure out what makes it display differently on those two pages. Here is the code.

    BLOG TEMPLATE








    < ?php single_post_title(); ?>







    < ?php
    $an_blog_perpage = intval( get_wip_option_by('xe_blog_ppp', '5') );

    $args=array(
    'post_type' => 'post',
    'post_status' => 'publish',
    'posts_per_page' => $an_blog_perpage,
    'ignore_sticky_posts' =>1,
    'paged' =>$paged,
    );
    query_posts($args);

    while (have_posts()): the_post();
    ?>



    < ?php if( has_post_thumbnail()) { ?>



    < ?php } ?>

    " title="< ?php the_title_attribute(); ?>">< ?php the_title(); ?>



    < ?php print __('By', 'wip'); ?> < ?php the_author_posts_link(); ?>
    < ?php print __('on', 'wip'); ?> < ?php the_time('F d, Y'); ?>
    / < ?php comments_popup_link( __('Leave a comment', 'wip'), __('1 Comment', 'wip'), __('% Comments', 'wip') ); ?>


    < ?php wip_blog_printcontent(); ?>



    < ?php print __('Posted in:', 'wip') ?> < ?php the_category(', '); ?>



    " title="" >
    < ?php echo get_wip_option_by('xe_blog_rm', 'read more'); ?>






    < ?php

    endwhile;

    wip_pagenavi();

    wp_reset_query();

    ?>




    < ?php get_sidebar(); ?>











    < ?php get_footer(); ?>

    SINGLE POST PAGE

    < ?php get_header(); ?>






    >





    < ?php
    if(have_posts()):

    while (have_posts()): the_post();
    ?>



    < ?php the_title(); ?>



    < ?php print __('By', 'wip'); ?> < ?php the_author_posts_link(); ?>
    < ?php print __('on', 'wip'); ?> < ?php the_time('F d, Y'); ?>
    — < ?php comments_popup_link( __('Leave a comment', 'wip'), __('1 Comment', 'wip'), __('% Comments', 'wip') ); ?>


    < ?php if( has_post_thumbnail() && get_post_meta($post->ID, '_disable_thumbnail', true) !== "1" ) { ?>



    < ?php } ?>

    < ?php the_content(); ?>



    < ?php print __('Posted in:', 'wip') ?> < ?php the_category(', '); ?>


    < ?php
    $tags_list = get_the_tag_list( '', ', ' );
    if ( $tags_list ):
    ?>

    < ?php printf( __( 'Tagged : %1$s', 'wip' ), $tags_list ); ?>

    < ?php endif; ?>




    < ?php
    comments_template( '', true );
    ?>

    < ?php

    endwhile;

    endif;

    wp_reset_query();

    ?>




    < ?php get_sidebar(); ?>











    < ?php get_footer(); ?>

    I would be grateful for any info to point me in the right direction.

    # December 13, 2011 at 2:42 am

    I’m guessing there is a float or display specified for lists. Take a look at the CSS. Also if you have a link to a live site we will be able to help more.

    # December 13, 2011 at 6:28 am

    Thanks @stevencrader. I have looked through the css but I am not finding the code to make this happen.

    Here is the link http://wp-testing.bopedesign.com/?page_id=104

    # December 13, 2011 at 6:45 am

    Looking at the source of the (live) front page and single page is appears on the front page it is showing displaying

    item 1 item 2 item 3

    rather than as a list.

    Is it set to only display the excerpt on the front page? can you toggle this option to see if you can tell if this is the source of the problem?

    # December 13, 2011 at 6:45 am

    On the front page, the content is written by using this code:

    < ?php wip_blog_printcontent(); ?>

    This seems to strip the content from some tags, if you look in the source code of your page you’ll see that there’s not even any UL or LI tags anymore.

    Not sure if this a plugin or part of your theme, but if you replace it with:

    < ?php the_excerpt(); ?>

    or:

    < ?php the_content(); ?>

    (like it is in your single post template), you should be fine.

    (BTW, the blue font on black background is a little hard on the eyes)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".