Help me delete this silly line!
-
https://megahurt.net/bandgrade/
On the left in the LINKS section… right under “What is GetHurt.com?” there are 2 lines. There should only be one.
I think it happened when I added some code I found here to add in the HOME link.
Any idea how to fix that?
-
My guess is it has something to do with the ul tags around the Home link.
Currently your page is outputing this to the source
<ul>
<li class="pagenav">
<h2>Navigate</h2>
</ul>
<ul>
<li><a href="https://www.megahurt.net/bandgrade" title="Home">Home</a></li>
</ul>
<ul>
<li class="page_item"><a href="https://megahurt.net/bandgrade/?page_id=2" title="Want to be reviewed?">Want to be reviewed?</a>
<li class="page_item"><a href="https://megahurt.net/bandgrade/?page_id=13" title="What is GetHurt.com?">What is GetHurt.com?</a>
</ul>
When I think what you’re wanting it to look like is
<ul>
<li class="pagenav">
<h2>Navigate</h2>
</ul>
<ul>
<li><a href="https://www.megahurt.net/bandgrade" title="Home">Home</a></li>
<li class="page_item"><a href="https://megahurt.net/bandgrade/?page_id=2" title="Want to be reviewed?">Want to be reviewed?</a>
<li class="page_item"><a href="https://megahurt.net/bandgrade/?page_id=13" title="What is GetHurt.com?">What is GetHurt.com?</a>
</ul>
If you can’t get it from that then post the relevant part from your sidebar.php file and we’ll go from there.
(my skillz at posting teh code aren’t that hot! ?? )
Ok wow, I forgot… the blog has been moved, successfully I think. I just really need to kill this little line. I’m sure it’s simple for most of the more advanced folks here.
new address: https://gethurt.com/
This shows up in the source:
<ul><li class="pagenav"><h2>Navigate</h2><ul><li><a href="https://www.gethurt.com" title="Home">Home</a></li></ul><ul><li class="page_item"><a href="https://gethurt.com/?page_id=2" title="Want to be reviewed?">Want to be reviewed?</a></li>
<li class="page_item"><a href="https://gethurt.com/?page_id=13" title="What is GetHurt.com?">What is GetHurt.com?</a></li>
</ul></li></ul>If you remove some extraneous ul tagsets, I think it will go away. Make that section of your sidebar look like this:
<ul><li class="pagenav"><h2>Navigate</h2><li><a href="https://www.gethurt.com" title="Home">Home</a></li><li class="page_item"><a href="https://gethurt.com/?page_id=2" title="Want to be reviewed?">Want to be reviewed?</a></li>
<li class="page_item"><a href="https://gethurt.com/?page_id=13" title="What is GetHurt.com?">What is GetHurt.com?</a></li>
</ul>In general, your list items (li) need to be enclosed in only one ul….
This is the code from sidebar.php, copied and pasted with no edits:
<div id=”sidebar”>
<form style=”padding: 0px; margin-top: 0px; margin-bottom: 0px;” id=”searchform” method=”get” action=”<?php bloginfo(‘url’); ?>”>
<p style=”padding: 0px; margin-top: 0px; margin-bottom: 0px;”><input type=”text” class=”input” name=”s” value=”Search” id=”search” /></p>
</form>- <?php
$pages = wp_list_pages(‘sort_column=menu_order&exclude=6&title_li=<h2>’ . __(‘Navigate’) . ‘</h2>&echo=0′);
echo stripslashes($pages);
?><div class=”title”>Categories</div>
- <?php wp_list_cats(); ?>
<div class=”title”><?php _e(‘Links’); ?></div>
- <?php get_links(‘-1’, ‘
- ‘, ‘
‘, ‘
‘, FALSE, ‘id’, TRUE,
TRUE, -1, TRUE); ?><div class=”title”><?php _e(‘Archives’); ?></div>
- <?php wp_get_archives(‘type=monthly’); ?>
<p></p>
<script type=”text/javascript”><!–
amazon_ad_tag = “gethurtcom-20”; amazon_ad_width = “120”; amazon_ad_height = “600”; amazon_ad_link_target = “new”;//–></script>
<script type=”text/javascript” src=”https://www.assoc-amazon.com/s/ads.js”></script>
<p></p></div>
________________________I’m just not seeing anything that looks just like what you posted. God, code sucks.
Well, yeah. It does. What you see when you view source (what I did to grab the two things I posted) is what is generated by your theme files AND the core files which produce the “engine” which runs wp and outputs the display.
And what you posted didn’t display as code, mostly, because the “engine” that runs bbPress sucks when it comes to code.
Could you post the contents of your sidebar.php to https://wordpress.pastebin.ca and then post the resulting link here? That way I can see the code in situ as it were, and that might help.
It’s late here, and I’ll have to be up really early so I may not see it tonight, but should be able to look at it tomorrow morning….
Re: your topic title – it’s not the line that is “silly”, it is silly coding ??
Simply put: it’s a bad combination of wrongly nested lists and incomplete stylesheet.
You have
#sidebar li {...}
defined in your stylesheet with border-bottom 1px etc.
The normal result for it is what you see: if you have N number of li tags nested – you will get N number of bottom border lines!Either re-write the code for displaying the Pages… or make your CSS more detailed to deal with the nested lists.
To be honest, I have no idea what you just said. I didn’t exactly “write” that code. I did a search on here for how to add a HOME link in there, and I simply pasted in what it told me to. I got the correct result, aside from this extra line.
I hate to be so code-ignorant, but I just am. is there a specific line of code that I can alter or delete to just get rid of that line?
No, there isn’t ONE line. There should be many lines added, changed, tweaked…
Hiya megahurt –
I took out the extra ul tagsets. The reworked code is here: https://wordpress.pastebin.ca/251044
It’s the whole code you originally posted, minus the extra ul tags. Save a backup copy of your file, then copy the code from pastebin and paste it over the code in your file; see if that helps the line problem.
That did it… sort of. Now there is a line above “Home”, all of the other sections don’t have that.
I really appreciate the help, thank you.
Let me look at that a bit more. It’s likely there’s something else extraneous in there…. I just re-grabbed the code I posted; I may not be able to get back to this until tomorrow afternoon. Just keep checking back, I’ll update this thread at that point, ‘kay?
Hiya…. I had a few minutes just now…. tweaked s’more using Firefox, webdev toolbar, aardvark and inline view formatted source.
This is what I came up with. https://wordpress.pastebin.ca/251437
This starts with
<div id="sidebar">
and ends with the amazon block. Copy what I put at pastebin over the same lines in your sidebar.php file (MAKE A BACKUP FIRST!)Post back how it goes….
That one made my posts go all crazy… they were dropped way low on the page and a totally new, horizontal Amazon ad was across my page.
Hmmmm…. well, revert to the one with the line above Home for now.
It would be easier for me to have the whole theme to work with. If you would zip the complete theme folder and email to me at vkaryl_at_bytehaven_dot_com I can put it up on a test bed of my own and see what’s going on.
- The topic ‘Help me delete this silly line!’ is closed to new replies.