WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trying to add a subscribe button to the sidebar (42 posts)

  1. talon39
    Member
    Posted 6 years ago #

    I'm trying to add a subscribe button to the sidebar of my new blog. I'm a newb to WP but not a newb to html. I am following the instructions given here http://faq.wordpress.com/2006/10/23/put-your-feed-in-your-sidebar/.
    I have created a text widget and added the following code:
    <a href=”http://www.gocanyoneering.com/blog/feed/”><img src=”http://faq.files.wordpress.com/2006/11/b28.png” alt="Subscribe"/></a>
    The strange thing is, only the text from the alt tag shows up. If I remove the alt tag, there nothing shows up. Could it be something in my theme preventing it?

  2. talon39
    Member
    Posted 6 years ago #

    Somebody? Anybody?

  3. ipsych.org
    Member
    Posted 6 years ago #

    Looks like the image cannot be accessed, have you tried uploading the image in your blog and linking to this image?

  4. talon39
    Member
    Posted 6 years ago #

    Ok, I just renamed the image to rss-medium.png and uploaded it to /wp-includes/images/rss-medium.png .
    Then I replaced the code withe the following:

    <a href=”http://www.gocanyoneering.com/blog/feed/”><img src=”/wp-includes/images/rss-large.png” /></a>

    I also tried:

    <a href=”http://www.gocanyoneering.com/blog/feed/”><img src=”http://www.gocanyoneering.com/blog/wp-includes/images/rss-medium.png” /></a>

    Neither way works. I don't see anything in the side bar. Just an empty block.

  5. talon39
    Member
    Posted 6 years ago #

    I thought maybe it was the them I'm using so I tried other thems including the default theme and all give the same result. I looked at the page source while viewing the page and the html looks ok. The only thing I can think of it maybe the CSS is messing with it? The text widget has the class="textwidget". I will look for the style sheet and see if there is anything in ther that could interfere. This is my first WP blog, so I'm not sure how the CSS/themes work. I assumed that the CSS file was different in each theme, but if that is true, why would this problem happen in all themes?

  6. talon39
    Member
    Posted 6 years ago #

    I think I see what's causing the problem, but I'm not sure why.

    If I place the mouse over where the image should be displayed and right-click, I get all the options I would get if I right clicked a visible graphic. I get get the option to "copy image", etc... So I clicked properties. It says the image location is:
    http://www.gocanyoneering.com/blog/%E2%80%9Dhttp://www.gocanyoneering.com/blog/wp-includes/images/rss-medium.png%E2%80%9D

    It says the link url is:
    http://www.gocanyoneering.com/blog/%E2%80%9Dhttp://www.gocanyoneering.com/blog/feed/%E2%80%9D

    Why is it butchering the URLs?

  7. talon39
    Member
    Posted 6 years ago #

    I am posting in the right forum? Anyone want to take a guess?
    I'm good at answering questions. Really I am. This is my first WP blog and frankly I'm getting no where fast. Been asking for help for two days and only one person responded. Is my problem really that impossible?

  8. talon39
    Member
    Posted 6 years ago #

    Anyone? Did I mention this is a fresh install? How bad could it be messed up?

  9. talon39
    Member
    Posted 6 years ago #

    Update I changed the blog location to http://blog.gocanyoneering.com.
    The code I put in the text widget is:
    <a href=”http://blog.gocanyoneering.com/feed/”><img src=”http://blog.gocanyoneering.com/wp-includes/images/rss-medium.png” /></a>

    I see a small dark spot where the image should appear. When I look at the image properties, I shows the image location as:
    http://blog.gocanyoneering.com/%E2%80%9Dhttp://blog.gocanyoneering.com/wp-includes/images/rss-medium.png%E2%80%9D

    It shows the link URL as:
    http://blog.gocanyoneering.com/%E2%80%9Dhttp://blog.gocanyoneering.com/feed/%E2%80%9D

    I realize I'm talking to myself here. Thanks to ipsych.org for his suggestion.
    This is officially the least helpful forum I have ever participated in. Is the another forum somewhere where I can get help?

  10. talon39
    Member
    Posted 6 years ago #

    Could a moderator perhaps move this to the "WP-Advanced" forum?

  11. SmartWoman
    Member
    Posted 6 years ago #

    Maybe try the same thing with a jpg file to troubleshoot it - it might be that the .png doesn't work. I use text widgets for linkable pictures all the time and it works great, but I only use jpg format file.
    Vicki

  12. buddha trance
    Member
    Posted 6 years ago #

    As a workaround, try to hard code the link into sidebar.php, taking away any reference to the text widget.

    <ul>
    <li>
    <h2>Subcribe to my Blog</h2>
    <div><a href=”http://blog.gocanyoneering.com/feed/”><img src=”http://blog.gocanyoneering.com/wp-includes/images/rss-medium.png” /></a></div>
    </li>
    </ul>

    If that works, there is something weird with your widget.
    The following looks kind of odd:
    <li id="text-283055591" class="widget widget_text">

  13. talon39
    Member
    Posted 6 years ago #

    Thanks for the suggestion SmartWoman. I just tried it. Same result as before. I'm pretty sure the browser is looking at the wrong URL for the image. When I look at the page source, the code looks fine, the url is correct, but if I view the page in browser and look at the image properties, the URL is all messed up.. I have no idea what could cause that. I have tried it in IE, Firefox, and Google chrome. All the same.

  14. talon39
    Member
    Posted 6 years ago #

    I tried you suggestion buddha trance. I noticed that the file sidebar.php is located in the folder of the theme I am using. Each theme has a separate one. This is the only place I found this file. I added you coded to the theme I am using. However noting is displayed on the website. Adding that code made no visible change to the page.

    I added the same image to my test article using the wysiwg. The flash image uploader wouldn't work so I used the URL method. The image displays correctly in the article.

  15. buddha trance
    Member
    Posted 6 years ago #

    This is so weird... let me look some more at your code...

  16. talon39
    Member
    Posted 6 years ago #

    buddha trance,
    I created a new line item and put your code between the "categories" line item and the "archives" line items. Like this:

    <li><h2><?php _e('Categories'); ?></h2>
    
                      <ul>
    
                      <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
    
                      </ul>     
    
             </li>
    		 <li>
    		          <ul>
                         <li>
                          <h2>Subcribe to my Blog</h2>
                          <div><a href="http://blog.gocanyoneering.com/feed/"><img src="http://blog.gocanyoneering.com/wp-includes/images/rss-medium.png" /></a></div>
                         </li>
                      </ul>
    		 </li>
    
             <li><h2><?php _e('Archives'); ?></h2>

    I would think at least the header2 would show up.

  17. talon39
    Member
    Posted 6 years ago #

    I wondered if something in the .htaccess file could be messing with it. WP created an .htaccess file when it was installed. I deleted the file a moment ago, but it didn't make any difference, so I put the .htacces back.

  18. talon39
    Member
    Posted 6 years ago #

    It seems like a bunch of 2.6.3 sites are being hacked. I don't think this is my problem, but since I just installed 2.6.3, I'm going to delete it and start over with 2.6.5, just for security. Maybe that will fix the problem. If not, I'll be back in a half hour.

  19. buddha trance
    Member
    Posted 6 years ago #

    Looking at the source of your page, did you revert to using the text widget, instead of the plain code?

    I just downloaded the theme you are using, to look at the files. In sidebar.php of your theme, the original file lists also other widgets, which don't appear on your site (search form, calendar, etc.). Did you disable them from the admin dashboard?

    Just in case, try to switch to the default theme, and see if the problem persists.

    Another option, because sometimes error are silly small stuff (I have wasted many hours, to find out later that a comma or something like that was missing), did you check that there are no spaces between " and ", or double slashes and such, in the html you wrote in the text widget?

    The link to the feed in your test page is fine, while the one on the sidebar has your domain twice.

    If not, and to single out the fact that the text widget may be the guilty one, try with the Simple Image Link plugin. See if that works as a test.

  20. buddha trance
    Member
    Posted 6 years ago #

    Good idea, start over with the latest release. I am upgrading right now as well.

    Let us know if upgrading solved the problem!

  21. talon39
    Member
    Posted 6 years ago #

    Ok back with a fresh install of 2.6.5
    Same problem as before.
    I created a text widget and added the following code:
    <a href=”http://www.gocanyoneering.com/blog/feed/”><img src=”http://faq.files.wordpress.com/2006/11/b28.png” alt="Subscribe"/></a>

    If you look at the site, you will see a link that says "Subscribe". This is interesting, because what it is displaying is the alt tag of the image instead of the image. The link url has been butchered like before.

  22. talon39
    Member
    Posted 6 years ago #

    In answer to your previous question. I left the widget in place and added you code, so you would expect to see both, but you code wasn't displayed at all, only the text widget with the missing image was displayed.
    Thanks for the suggestion about swithing themes. I had previously tried that. All themes give the same result. I changed to that theme, because it was the only one that showed a dark splotch where the image should appear which allowed me to right click and view the image properties. With other themes the image location isn't visible.
    I didn't enable or disable any other widgets. It was really a fresh install, other than adding a few themes. Maybe I would have to enable those other themes for them to appear. However, like I said. All themes I have tried have the exact same issue, including the default themes. The 2.6.5 install you see now, is fresh out of the box. I deleted everything and started over. I haven't even adding any themes. The problem behaves exactly the same as before.
    The code I added is exactly as you see it in my previous post. I have completely typed it in from scratch several times. There are no typos unless you can find one in my previous post (I copied and pasted directly from the text wideget).
    Thanks for you help!

  23. talon39
    Member
    Posted 6 years ago #

    Ok being that this is a fresh install, I have to conclude that there is an issue with this version of WP, or there is a problem with my server environment. Here what I know:

    • WP 2.6.5 - fresh install
    • Host- 1and1 (dont laugh)
    • mysql5.0 database
    • PHP Version 4.4.9

    See anything wrong? Is there anything else about my environment I should check?

  24. buddha trance
    Member
    Posted 6 years ago #

    This a real mystery...

    If you are using other plugins, did you try disabling them to see what happens?

    I doubt it's a host problem, because the link was perfect in the test page.

    Let me think some more, and also hope that someone else with a bright mind in this forum can shed some light. =)

  25. buddha trance
    Member
    Posted 6 years ago #

    I went to look at the sidebar of my theme (Primepress)... rather than html coding, why don't you try to duplicate what I have, hard coded in the sidebar.php of your theme, hoping that using blog url, rather than the full path, might make a difference...

    <div id="pp-feed">
    		<p><a href="<?php bloginfo('rss2_url'); ?>" title="Subscribe to this Feed via RSS">Subscribe to Feed</a></p>
    	</div>

    the css to add in the style.css

    /*-----RSS feed*/
    #pp-feed{height:32px; border-top:1px solid #aaa; border-bottom:1px solid #aaa; margin:0 0 1em 0; background:#ccc url(<strong>images/pp-rss2.png</strong>) no-repeat 2% 47%;}
    #pp-feed p{margin:0 0 0 65px; padding:8px 5px; font:bold 13px 'trebuchet ms', verdana, sans-serif;}

    play with it, and put the path to your image, where it's in bold.

    Disable the text widget when you try that.

    Hope this works for you!

  26. talon39
    Member
    Posted 6 years ago #

    This is driving me mad.
    buddha trance, thanks for you help. Thanks for not giving up on me.
    Im not using any plugins that were not installed and activated out of the box. This is an unmodified fresh install. I completely deleted the old database and all files. Then I installed fresh. I did not add nor modified anything. I did not activate anything.
    The only thing I did was add a text widget.
    I installed the Simple Image Link plugin you suggested. It seems to work, but doesn't explain what is wrong with the text widget. I also noticed something else strange since I installed the new version.
    http://blog.gocanyoneering.com/feed/ no longer works. It should allow you to subscribe to RSS. It is my understanding that is a standard feature of WP and it worked with 2.6.3.
    What the heck is going on? I have installed A LOT of php scripts over the years, but I have never had this much trouble with a fresh install.
    I could use the Simple Image Link plugin as a work around, but I can't help but think there is something broken in my install. Until I know what is wrong, I won't feel confident putting a lot of work into a blog using this platform. I really hope I can figure this out. Thousands of people are using WP with no trouble. Why can't I?

  27. talon39
    Member
    Posted 6 years ago #

    I noticed that 2.6.5 did not create a .htaccess file. Should there be one? Could that be why /feed/ is not longer working?

  28. Vast HTML
    Member
    Posted 6 years ago #

    "Host- 1and1 (dont laugh) " this isnt a 1and 1 problem since i have used them for over 4 years and there wordpress support is one of the best. i cant think of any reason why anyone would laugh about this. I think this is either a problem with just your install, i dont know whats going on but for some reason something may be getting messed up during your install or your not setting it up properly in your options panel.

  29. buddha trance
    Member
    Posted 6 years ago #

    I understand your frustration, it would drive me mad too...

    I don't believe the .htaccess file has anything to do with it. I did not have one either upon first install and had to create one.

    When I click on the RSS blue button I do see the feed (http://blog.gocanyoneering.com/?feed=rss2), but you are right, the regular link now gives a 404 page.

    And the text widget is not an added plugin, right?

    If I were you, I would install a local copy of wordpress on your computer (I do have local backup copy also for testing purposes). For this you will need an app that can run phpMyAdmin and databases.

    If you are on a mac, you can use MAMP (google it, first link), for a PC I'm sure you'll find it with Google.

    That's a good way to see if it's a host related problem, or if the FTP program changes files during upload...

    Talon, WordPress is great, and there is no reason why you shouldn't be able to use it.

    Any experts out there that can solve this???

  30. talon39
    Member
    Posted 6 years ago #

    @erichamby
    What, do you work for 1and1 or something? You sound a bit sensitive about my comment. If I didn't think 1and1 would work for my site, I wouldn't be using them. It's just many people have strong feelings against 1and1 and I didn't want to get flamed. If I offended you, I apologize. I didn't blame 1and1 for this problem.
    However I stand by my deduction that this is a problem with either version 2.6.5 of WP, or it's a problem with my server environment (such as my php version of something). By saying server environment, I'm not saying my server is faulty or setup in a substandard way. I am saying perhaps something WP needs isn't there, is the wrong version, whatever.
    Assuming that I didn't screw up the install (twice). This is a fresh unmodified install, on a brand new 1and1 account. There are really only two variables here. The version of WP and the Server environment.

    If there are any things I need to setup after a fresh install to make this work (other than the things I mention previously), I hope somebody can enlighten me.

Topic Closed

This topic has been closed to new replies.

About this Topic