WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] No bullets on one list using default theme- possible? (9 posts)

  1. Ciryaquen
    Member
    Posted 7 years ago #

    How can you turn off the >> (double arrow) in the default theme for just a specific list?

    The objective is to have a page display an RSS listing as a list but without the double arrows. All other default formatting on a list for the main content is good.

    Here's the code I've tried.

    In the style sheet

    .rss-listing ul li {
    list-style: none;
    }

    and
    .rss-listing ul {
    list-style: none;
    }

    and

    .rss-listing ul li:before {
    list-style: none;
    content: "";
    }

    In a separate template called rss-listing.php

    <?php
    /*
    Template Name: rss-listing
    Description: A template for scraping an rss feed.
    */
    ?>
    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
    <div class="entry">
    some text
    <?php require_once(ABSPATH . WPINC . '/rss-functions.php'); ?>
    <?php $rss = fetch_rss('some-uri'); ?>
    <ul class="rss-listing">
    <?php foreach ( $rss->items as $item ) : ?>
    <li><?php echo $item['image_link']; ?>
    <a href='<?php echo $item['link']; ?>
    title='<?php echo $item['title']; ?>'>
    <?php echo $item['title']; ?>
    </a>
    <?php echo $item['description']; ?>
    </li>
    <?php endforeach; ?>
    </ul>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '', '
    '); ?>
    </div>
    rss
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I also tried adding the class to a span around the php, and numerous other changes to the CSS, including making the rss-listing an ID and others not already shown . The only thing that works to get rid of the double arrows is to remove any container with the "entry" class, but then all other formatting on the list is lost.

    Any advice will be appreciated.

  2. Root
    Member
    Posted 7 years ago #

    It is going to make a very big difference to the response you get if you supply a link to TBIQ - the blog in question. Guys here need to see the probem, they need to access your markup and CSS, and they need to be able to bring their tools (FF Web Dev Ex) to bear on the problem. Your issue is a walk in the park but the dog can't see the rabbit.

  3. Ciryaquen
    Member
    Posted 7 years ago #

    Thanks for the reply.

    How else to describe the problem? The default bullets on an unordered list on a page using the default theme won't turn off. The CSS is the default WordPress 6.0.2 CSS with the previously described class "rss-listing" and the template is quoted in its entirety above.

    Anyone with a default theme can try it. Add
    .rss-listing ul li {
    list-style: none;
    }

    or
    .rss-listing ul {
    list-style: none;
    }

    or

    .rss-listing ul li:before {
    list-style: none;
    content: "";
    }

    to the styles.css and then make a page using the default page template or any post with this code.

    <ul class="rss-listing">
    <li>test 1</li>
    <li>test 2</li>
    <li>test 3</li>
    </ul>

    It will not stop displaying the >> double arrow bullets. It's a problem in Firefox, Safari, and Opera.

    The wordpress installation is on my Mac and not accessible from the internet -- not even if websharing is turned on because I'm on dialup temporarily. I'm tinkering (locally) with the content for someone and when we get it the way he likes it we'll do an installation on his webhost. The only thing modified so far (in theme or template) is the header image and the css for the rss-listing class.

  4. Root
    Member
    Posted 7 years ago #

    A class is a complete thing. So you should be using

    .rss-listing {}

    or

    .rss-listing li {}

    as appropriate

  5. Ciryaquen
    Member
    Posted 7 years ago #

    I tried both of your suggestions for the declaration and neither turned off the double arrow >> bullets.

    .rss-listing li {
    list-style: none;
    }

    .rss-listing {
    list-style: none;
    }

  6. Root
    Member
    Posted 7 years ago #

    All I have done is indicate the CSS selector. You still need to add in the :before malarkey.

  7. Ciryaquen
    Member
    Posted 7 years ago #

    Root, I already tried changing the :before for the class - see my opening post. It didn't work.

    In theory one should be able to turn bullets off on a list using a class selector. In practice, I've done it. Just not on this default WordPress installation. For some reason, it's not working.

    This code also isn't working.
    ul.rss-listing {
    list-style: none;
    }

    I'm not a professional web designer and need advice. Specifically what must be changed to eliminate the double arrow >> bullets in the default theme on one specific un-ordered list while keeping all other formatting?

    Help will be appreciated.

  8. Root
    Member
    Posted 7 years ago #

    Yes but in your first code you have combined lis-style with before. Its a completely different thing. Check the recommended spec.

  9. Ciryaquen
    Member
    Posted 7 years ago #

    I've found an acceptable work-around. I removed all double arrows >> from all lists except the sidebar.

    .entry ul li:before, #sidebar ul ul li:before {
    content: "0BB 020";
    }

    is now

    #sidebar ul ul li:before {
    content: "0BB 020";
    }

    and the double arrows >> are gone.

Topic Closed

This topic has been closed to new replies.

About this Topic