• Resolved talon39

    (@talon39)


    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 https://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=”https://www.gocanyoneering.com/blog/feed/”><img src=”https://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?

Viewing 15 replies - 1 through 15 (of 41 total)
  • Thread Starter talon39

    (@talon39)

    Somebody? Anybody?

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

    Thread Starter talon39

    (@talon39)

    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=”https://www.gocanyoneering.com/blog/feed/”><img src=”/wp-includes/images/rss-large.png” /></a>

    I also tried:

    <a href=”https://www.gocanyoneering.com/blog/feed/”><img src=”https://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.

    Thread Starter talon39

    (@talon39)

    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?

    Thread Starter talon39

    (@talon39)

    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:
    https://www.gocanyoneering.com/blog/%E2%80%9Dhttps://www.gocanyoneering.com/blog/wp-includes/images/rss-medium.png%E2%80%9D

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

    Why is it butchering the URLs?

    Thread Starter talon39

    (@talon39)

    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?

    Thread Starter talon39

    (@talon39)

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

    Thread Starter talon39

    (@talon39)

    Update I changed the blog location to https://blog.gocanyoneering.com.
    The code I put in the text widget is:
    <a href=”https://blog.gocanyoneering.com/feed/”><img src=”https://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:
    https://blog.gocanyoneering.com/%E2%80%9Dhttps://blog.gocanyoneering.com/wp-includes/images/rss-medium.png%E2%80%9D

    It shows the link URL as:
    https://blog.gocanyoneering.com/%E2%80%9Dhttps://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?

    Thread Starter talon39

    (@talon39)

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

    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

    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=”https://blog.gocanyoneering.com/feed/”><img src=”https://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">

    Thread Starter talon39

    (@talon39)

    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.

    Thread Starter talon39

    (@talon39)

    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.

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

    Thread Starter talon39

    (@talon39)

    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="https://blog.gocanyoneering.com/feed/"><img src="https://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.

Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘Trying to add a subscribe button to the sidebar’ is closed to new replies.