WordPress.org

Ready to get started?Download WordPress

Forums

how to locate the url of my blog? (19 posts)

  1. sachi21
    Member
    Posted 7 years ago #

    Hello all,

    I want to know what the url is to my blog. I am using the Semiologic Static Frontpage Plugin. Hence, if I input, http://www.mydomain.com/blog , it will take me to the front page.

    I want to create a link in the navigation that will link to my blog's frontpage but unsure what the url would be. Thoughts?

  2. Kafkaesqui

    Posted 7 years ago #

    With WordPress you can use something like:

    <a href="<?php bloginfo('url'); ?>">Home</a>

    More info on bloginfo():

    http://codex.wordpress.org/Template_Tags/bloginfo

  3. sachi21
    Member
    Posted 7 years ago #

    Well, the problem with this is that I once I implemented it, the url takes me back to my homepage and not to my blog. As I mentioned, I am using the Semiologic Frontpage Static Plugin and that is what is preventing the blog url to show up.

    Of course, I can disable the plugin, but then my blog would show up on the homepage and I don't want that as I want just a normal homepage. Is there a way to get around this?

    Thanks.

  4. moshu
    Member
    Posted 7 years ago #

    If you don't want your blog as your homepage why did you install WP in the root directory? When you don't want it as the main page it should be installed in a subdir.

  5. sachi21
    Member
    Posted 7 years ago #

    Honestly, I didn't know that when I installed this. Having said that, if I installed WP into a subdir, then my homepage would no longer be the top level domain, would it? ie; http://www.mydomain.com

    It would be like http://www.mydomain.com/subdir and then the blog url would
    http://www.mydomain.com/subdir/blog . Right?

    So I guess there is no way to reach both goals-- have the blog url and then have a top level domain for my homepage?

  6. moshu
    Member
    Posted 7 years ago #

    No. I mean it depends what you mean by homepage... a non-WP whatever index file? That would be at example.com.
    If WP is installed in a directory called "moshu" - your blog would be at
    example.com/moshu
    If you install WP in a subdir called "blog" > example.com/blog

  7. sachi21
    Member
    Posted 7 years ago #

    >>>No. I mean it depends what you mean by homepage... a non-WP whatever index file? That would be at example.com.

    No- my entire website is based out of WP, including the homepage.

  8. moshu
    Member
    Posted 7 years ago #

    Ah, now I got it... well, if that plugin is using the "home.php" mechanism built in WP (see Template Hierarchy in Codex) then you can not have both.

    Also, see http://www.semiologic.com/software/static-front/
    FAQ, the 2nd question.

  9. sachi21
    Member
    Posted 7 years ago #

    >>>Ah, now I got it... well, if that plugin is using the "home.php" mechanism built in WP (see Template Hierarchy in Codex) then you can not have both.

    Wow. I'm surprised. Considering all the wonderful things that WP can do :(

    I installed the opt-in plugin but still no go. I'll have to post on their community forum to see what the issue is.

    Having said that, I guess another option to get around this is to have WP installed twice. Once for the website and then another for the /blog domain. I'd prefer not to do that but a blogger has to do what a blogger has to do....

  10. sachi21
    Member
    Posted 7 years ago #

    I was posting to the Semiologic community forum, but still had issues with their plugin.

    So I sat there and thought about it for a while.

    And when I sit there and think about it, there is one way to get around this w/o using the opt-in plugin because you have to admit that it's kinda wierd to categorize every entry under "blog." Just wierd.

    I was thinking of creating a link from the homepage and point it to something like this; /blog/2006 . Like this;
    http://mydomain.com/blog/2006 . Whereby 2006 is the yearly archive.

    In effect, visitors would be looking at the entries for the current year which pretty much replicates what most of us see when we visit a blog- the most recent entries which are all for the given year.

    I thought this might help those who would have future issues.

  11. Inspired2Write
    Member
    Posted 7 years ago #

    Hi Sachi21,

    I relate to what you are talking about. Don't feel dumb, I did the same thing - I installed WordPress in my root directory as well and in that I didn't have the tech experience, WordPress experience, or hindsight to do otherwise, I found myself in the same boat as yourself with wanting a unique styled homepage rather than my WordPress blog as the homepage. Although I haven't tried it, here is another possible option to resolve this issue:

    http://www.ilfilosofo.com/blog/home-page-control

    I had an experienced WordPress user refer me in that direction, but as I mentioned above I haven't taken the time to give it a try. If you decide to use it then let me know. I have another project to finish up before tackling that one. I hope that may be of help to your dilemma!

  12. vkaryl
    Member
    Posted 7 years ago #

    And you can actually do this without a plugin at all, by installing wp in a subfolder, then setting up your actual home page using <?php require('path-to-wordpress-install/wp-blog-header.php') ?> at the very top of the index.php file (before the doctype even).

  13. Inspired2Write
    Member
    Posted 7 years ago #

    Hi,

    Problem is though from what Sachi21 has explained, WordPress was already installed in their root directory. If the person already has posts and pages created, uninstalling WordPress from the root directory and re-installing it in a subfolder - wouldn't that cause all the existing posts and pages to become dead pages online since they would then be assigned new permalinks?

  14. moshu
    Member
    Posted 7 years ago #

    The Pages and posts would not become dead - only the old links!

  15. sachi21
    Member
    Posted 7 years ago #

    >>>I relate to what you are talking about. Don't feel dumb,

    Nah, I don't feel dumb :) Just a bit irked at this moment. I forgot all about Filofso plugin until you mentioned it. I installed it. It works just like the Semiologic plugin works so that was fine.

    I tried to customize my permalinks by prepending, "/blog/" to the permalink structure. I had to manually update my .htaccess file for whatever reason with the following code;
    ------------------
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    ---------------

    but now, I get a 500 internal server error for any page but the homepage.

  16. sachi21
    Member
    Posted 7 years ago #

    >>>The Pages and posts would not become dead - only the old links!

    Confused. when you say old links, aren't you referring to the old posts?

  17. moshu
    Member
    Posted 7 years ago #

    No, I am not. The posts are in the database, always in the same location. Just because you move the WP files in another directory - the posts and Pages are still there in the DB!
    Moreover, since the plugin made your posts to appear as if they were in a directory called "blog", all you have to do: move the whole WP install in a subdirectory called "blog" and then make up a home/main page at the root > using the method posted by vkaryl. Voila! you have a whatever static homepage at example.com and the whole blog at example.com/blog

  18. sachi21
    Member
    Posted 7 years ago #

    Thanks Moshu. Just to clarify one thing. When you say the "whole WP install", you are referring to each and every file and directory found in my root directory. Which I believe is wp-admin, wp-content, wp-include and all the "wp" prefixes to them.
    I just want to make sure of the terminology that you are using and that I'm on the same page.

  19. kingmoore
    Member
    Posted 7 years ago #

    Hello Sachi, I was referred to your post by a moderator. I am having a similar problem, but didn't realize it from the title of your post.

    I have my blog set up as my main website, but I want the home page to be different than the rest of the blog... well in the same framework but have a bit different functionality.

    i want the home page to have functionality i specify in home.php but I also want to be able to link to the blog as you would normally see it. like you i am a bit frustrated that there is no link to a page that is the normal index page before i created my custom home page.

    your idea of linking to archive/2006 is a good one. I hadn't though of that. the only problem is I will have to manually change thing links come Jan 07, and then my 06 posts wont be easily available to the user.

    another solution i thought of was to have one category called posts or something like that and put all my categories in there. that may work.

    this really seems like wordpress should have a default URL you can point to like wordpress/all_posts or wordpress_index that will provide the default view even if you have created your own home.php page.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags