WordPress.org

Ready to get started?Download WordPress

Forums

Inject Blog functions into site. (13 posts)

  1. nouman6
    Member
    Posted 6 years ago #

    Hi!

    I would like to install wordpress and use only minor functions of the blog on my main page. I have read this:
    http://codex.wordpress.org/Stepping_Into_Template_Tags
    , but don't understand it 100%. the functions I would like to add to the site page are:

    - Log in/ log out boxes, and option to register
    - Normal blog, author, date, time, CONTENT, option to comment.

    Thanks!

  2. moshu
    Member
    Posted 6 years ago #

    Install WP in a subfolder and if your main page is a .php file, just add this at the very top, before anything else:

    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    After that you can use any WP function (template tag) in your main page.

  3. nouman6
    Member
    Posted 6 years ago #

    moshu, thank you very much for the help. I am about to leave soon, so I can't test it right now but when I do I will reply back here asap how it went.

  4. nouman6
    Member
    Posted 6 years ago #

    thanks again for that :D
    It worked and I got the log in option added to the menu:

    http://www.oakhillbible.com/test/

    but...it's harder to understand how to display a blog post then the login option xD

    sorry if this asking too much.

    I would like to show on the front page, only the most recent blog. It should display as a normal blog would, title, date, author then the blog itself, and the option to comment.

    then i'm going to have a separate blog page on the site, here it will display just as the the one before but will display the most recent 10 blogs and the archives.

    thanks for your help so far!

  5. nouman6
    Member
    Posted 6 years ago #

    bump

  6. nouman6
    Member
    Posted 6 years ago #

    bump :D

  7. moshu
    Member
    Posted 6 years ago #

    Once you have that file prepared you can use any WP template tag to display whatever you want.

  8. nouman6
    Member
    Posted 6 years ago #

    Yes, as I mentioned before I got the tag for log in to work and it is shown in the navigation now:

    http://www.oakhillbible.com/test/

    what I don't get is how to display a full blog (just the posted blog part) There is something about having to be inside "the loop " and I don't understand so I was wondering if anyone can create a loop code for just a normal blog display:

    Author
    Date
    Title
    BLOG POST
    option to comment

  9. moshu
    Member
    Posted 6 years ago #

    Read about The_Loop
    (copy/paste)

  10. nouman6
    Member
    Posted 6 years ago #

    how can I get the [...] in the <?php the_excerpt(); ?>
    code to link to that blog post as a whole?

  11. nouman6
    Member
    Posted 6 years ago #

    alright I got that problem taken care of :D

    now I want to pretty much GET RID of the whole:
    http://www.oakhillbible.com/test/blog/

    I mean have no links to it. Right now when a user clicks comment:
    http://www.oakhillbible.com/test/blog.php

    when the hit comment they go back to that blog, I want that to be a page in the site.

    How can I do this?

  12. nouman6
    Member
    Posted 6 years ago #

    bump :D

  13. nouman6
    Member
    Posted 6 years ago #

    bump

Topic Closed

This topic has been closed to new replies.

About this Topic