Forums

rss2_url variable comes from? (21 posts)

  1. alternapop
    Member
    Posted 5 years ago #

    when clicking on the rss image for my site, it goes to my sites homepage

    http://www.alternapop.com and not the feed link

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />

    i've poked around the code and the options via the interface and am not sure where this variable 'rss2_url' is coming from. i could hack the link directly but would rather do it properly.
    thanks!

  2. moshu
    Member
    Posted 5 years ago #

    You are looking in the wrong place: in the head portion.
    Check those links in the body.

  3. alternapop
    Member
    Posted 5 years ago #

    i don't see any reference for rss in "Main Index Template". the two images at the top right of my site are what i'm referring to. these are inserted via the header.
    am i misunderstanding you?

  4. moshu
    Member
    Posted 5 years ago #

    Header, as in header.php and the <head> section of a html file are two different things!
    Yes, you misunderstood ;)

    Any html file should have

    <html>
    <head>
    ...stuff goes here...
    </head>
    <body>
    ... this is what you see!...
    </body>
    </html>

    I said: you were looking in the head instead of the body. In many themes the body part starts out in the header file.

  5. Otto
    Tech Ninja
    Posted 5 years ago #

    Yes, you are misunderstanding him. Those two images at the top right of your site are *not* related to the <link> tag in the <head> portion of the page.

    In your case, you need to look lower down the page, where this code is:

    <div id="hdrimg">
    <span class="validation">
    <a href=""><img src="http://alternapop.com/wp-content/themes/fluidity3c-10/images/rss.gif" alt="Subscribe to RSS" /></a>
    <a href=""><img src="http://alternapop.com/wp-content/themes/fluidity3c-10/images/rsscomments.gif" alt="Subscribe to Comments" /></a>
    </span>

    The href's are empty. That's why those links are broken. Find where those href's are generated in your template (probably at the bottom of header.php) and fix them there.

    As for your original question, 'rss2_url' is a hardcoded parameter for the bloginfo() function. You can find other possible parameters here:
    http://codex.wordpress.org/Template_Tags/bloginfo

  6. alternapop
    Member
    Posted 5 years ago #

    this is the body portion. the href link isn't empty.

    <div id="hdrimg">
    <span class="validation">
    <a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rss.gif" alt="Subscribe to RSS" /></a>

    the body portion uses the same function and points to the same variable. where is this variable coming from?

    thanks!

  7. moshu
    Member
    Posted 5 years ago #

    Put your code ALWAYS in between the "code" tags - you have it right above the input area... if you want anybody to take a look at it :)

  8. alternapop
    Member
    Posted 5 years ago #

    sorry about the code... fixed its display.
    the body href has the same function.

  9. Otto
    Tech Ninja
    Posted 5 years ago #

    where is this variable coming from?

    Like I said before, it is *not* a variable. It's a hard-coded parameter. One of many possible parameters. See here:
    http://codex.wordpress.org/Template_Tags/bloginfo

    Now, I also see that your link variable has a broken href too, as do your blog, contact, and links page tabs.

    This suggests a broken permalink structure. Try rebuilding your permalinks and see if that helps. Options->Permalinks->Update Permalink Structure.

  10. moshu
    Member
    Posted 5 years ago #

    Now I see what you mean: for some reason the template tag <?php bloginfo('rss2_url'); ?> is displaying an empty link both at the top and in your sidebar:
    <a href="">

    Try what Otto said about the permalinks.

  11. alternapop
    Member
    Posted 5 years ago #

    changing permalinks to 'default' changes the link to a site that i visit but is otherwise not connected to me at all. ??? how in the hell could this be happening?

    changing to any of the other options (numeric or date/name based) doesn't fix it.

    ?

    thanks guys!

  12. moshu
    Member
    Posted 5 years ago #

    changing permalinks to 'default' changes the link to a site that i visit but is otherwise not connected to me at all. ??? how in the hell could this be happening?

    There must be something very wrong with your whole setup.

  13. Samuel B
    moderator
    Posted 5 years ago #

    Fixing some of this stuff might be useful.
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.alternapop.com%2Findex.php&charset=%28detect+automatically%29&doctype=Inline&ss=1
    Also why does your site have the index.php on the end of it? Is this the way it's set up in admin -> Options?

  14. alternapop
    Member
    Posted 5 years ago #

    thanks samboll...
    i did just see that i had a space in a new addition to the stylesheet that was causing some major hangups. i'll look into the other stuff.

    isn't index.php supposed to be the default page? what else would it be?

  15. moshu
    Member
    Posted 5 years ago #

    Don't ask back, just answer it ;)
    A normal server does know that index is the default page. But in the Options (that samboll asked) you should NOT have index.php in the URI options, only addresses ending with folder names!!!

  16. alternapop
    Member
    Posted 5 years ago #

    my URL under wordpress and blog (options) are set with this:

    http://alternapop.com

    my index.html page redirects to index.php

  17. Samuel B
    moderator
    Posted 5 years ago #

    Redirects and WP don't play very nice. Isn't there a way to kill the index.html? Is there a reason it's necessary?

  18. alternapop
    Member
    Posted 5 years ago #

    Is there a reason it's necessary?

    i guess not. i removed it and it still works. still trying to fix the rss link though. looking at invalid code at the moment.

  19. moshu
    Member
    Posted 5 years ago #

    Your feeds are there and they work:
    http://www.alternapop.com/feed

    There is still something wrong with either your permalinks or htaccess or weird redirects. E.g clicking on
    http://www.alternapop.com/about.php > displays your main page. It shouldn't.

  20. alternapop
    Member
    Posted 5 years ago #

    i've figured it out. one of my plugins is doing it. when i disable them, the feeds link works.

    it was 'feedburner'...

    thanks a lot for all of your assistance!

  21. moshu
    Member
    Posted 5 years ago #

    That's easy: activate the plugins one by one and check every times whether it works or not.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags