• Resolved ciryaquen

    (@ciryaquen)


    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • 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.

    Thread Starter ciryaquen

    (@ciryaquen)

    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.

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

    .rss-listing {}

    or

    .rss-listing li {}

    as appropriate

    Thread Starter ciryaquen

    (@ciryaquen)

    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;
    }

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

    Thread Starter ciryaquen

    (@ciryaquen)

    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.

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

    Thread Starter ciryaquen

    (@ciryaquen)

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘No bullets on one list using default theme- possible?’ is closed to new replies.