WordPress.org

Ready to get started?Download WordPress

Forums

WP integration question (51 posts)

  1. Lauren
    Member
    Posted 9 years ago #

    A simple way to just have my posts be styled with my site's css? So it wouldn't have any extra things, it would just be words and my style sheet adding the bold effects, link effects, etc. And then I could just insert that into my php requires?

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    There is yes, but you've not really given us enough information to go on. It would be easier if you could say something like "Here's my page, and I've got my WP blog here and I'd like the posts to appear here ........."
    It could be as easy as saying "Just use 'The Loop' ( http://codex.wordpress.org/The_Loop ) and then styling some css, but it could be more complex......

    Let us know :)

  3. Lauren
    Member
    Posted 9 years ago #

    Okay, my site is:
    http://www.pink-starr.com
    and the WP is:
    http://www.pink-starr.com/wordpress

    Where my manual blog is now is where I would like to place my WP ^^

    Thanks

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Okaaay... this is frames / tables stuff.......ick :)

    The main page has to be a .php page
    That main page must also have this at the very top:
    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>

    But that may not work so I would use (or start with):
    <?php
    /* Don't remove this line. */
    require('../wordpress/wp-blog-header.php');
    ?>

    Then, where you want the blog bit to appear, you put The Loop, and this next bit is where it gets tricky...not tricky tricky just tricky how you will use the code.
    For instance:
    <div class="blogpart">
    .
    .
    all the WP code
    .
    .
    </div>

    would work, but you could drop the wp code inside the table you have. You would then end up - once it's working - with some pretty ugly text, but css will take care of that.

    That make sense ?

  5. Lauren
    Member
    Posted 9 years ago #

    Hmm... not really?

    So I would begin with what you said, then do the loop. I understand that much.

    But then...? My site coding is just php with the codegrl php. When it requires the header.inc and then you have the content text or whatever and then it requires the footer.inc. So I would just:
    Begin/Head
    Loop
    WP CODE
    And the Foot?!

    (And the CSS would be okay in my header I hope?)

  6. Mark (podz)
    Support Maven
    Posted 9 years ago #

    This may be trial and error....I don't know of the codegrl php.

    At the very top of your current index, put
    <?php
    /* Don"t remove this line. */
    require("../wordpress/wp-blog-header.php");
    ?>

    Then, wherever you want the content, paste The Loop.
    Do not remove any parts of The Loop at all until it's working or we will find it hard to help.

    CSS in your header ? Yea, it can work there.

    (It's 1:30am ....... back after some ZzZzZzzzzzz)

  7. NuclearMoose
    Member
    Posted 9 years ago #

    Podz you lazy git... :P

  8. Lauren
    Member
    Posted 9 years ago #

    Okay, I tried what you said... and I tested it here:

    http://pink-starr.com/wordpress/pleasework.php

    :P Didn't quite work, I will try to learn what I can tho ^^ 1:30 there? Thanks for helping me! It's only 8:40 here.

  9. Lauren
    Member
    Posted 9 years ago #

    Haha Nuclear. That's not very nice! :D

    Wow, I'm slow. I didn't even realize that post was there before mine till, what, and hour later? :P Okay, time for my bed too. ^^

  10. Lauren
    Member
    Posted 9 years ago #

    Okay, I messed with it a bit... But I seem to have succeed only in confusing myself more!!?

    One: What part of the index code do I need to copy to have the posts show up? Becuase If I use it all then I have to have the whole style with it.. which isn't what I want.
    Two: It comes up with a '_e() not defined' error when I use my sites header. So obviously there is somthing in the blog-header that I need. How do I combine the two headers to make it work with my site?
    Three: Why am I so impaired with this?! :P I can't remember what I was gonna put here. That me though, I won't remember it until I'm comfy in my bed or something! :D

  11. Lauren
    Member
    Posted 9 years ago #

    Okay, so I am pretty confused, btu I'm gonna go try and work on it again. =o Hehe

  12. Lauren
    Member
    Posted 9 years ago #

    Okay, still a bit confused. I want to use my own header and footer. But there is an error that comes up (http://www.pink-starr.ocm/wordpress/pleasework.php) when I don't use the one it comes with.. (wp-blog-header). Also, are there things in the index that I need in there? Right now I have it all in there...

  13. mattme
    Member
    Posted 9 years ago #

    wordpress is a mission to integrate into your site, but it is possible
    i managed at http://purpletentacle.co.uk - i also integrated kwiki, a perl cgi wiki engine, which was a lot easier.

    imo, wordpress comes way over-styled, i would have found it really helpful for it to have come with a skeleton skin. wordpress is difficult because there is so much php intermingled with the html. and a lot of it you don't want.

    i would have found it helpful for wordpress to have come with just the basic php for displaying the posts, without navbar, links etc, wordpress by default generates a whole website much of which you don't want. surely most users who try wordpress already have a site. wordpress could have then included instructions with more optional php to add.

    i was also confused by the fact wordpress uses some of it's own custom php functions to make html, but i can't find these anywhere, so i can't change some bits.

    i haven't yet got 'static' pages working through wordpress. i almost did, but it generated bad mod_rewrite which broke the wiki. it keeps trying to write into the root .htaccess file and not /wordpress/.htaccess - or maybe i broke some of the php in page.php

  14. Lauren
    Member
    Posted 9 years ago #

    Ermm... I don't see how this was supposed to help me? I didn't see a question in there from you either. So I'm a bit confused. :P

    I'm just trying to figure this out, and it's quite fustrating! Can anyone answer my question?

  15. Lauren
    Member
    Posted 9 years ago #

    Seriously, nobody can help me? :( I suppose I can go search somewhere else.

  16. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Hang on :)

    First - have you got WP working just on it's own yet ? It's not clear from the above if you have or have not.

  17. Lauren
    Member
    Posted 9 years ago #

  18. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Your comments work too :)

    Soo.......the goal is to get the WP Loop into your page ?
    And so far you cannot get the blog-header bit correct ?
    (Sorry to go over it, but if we start from the back and work forwards again..)

  19. Lauren
    Member
    Posted 9 years ago #

    Yes, sorta. I am tring to use my own header and footer, but there must be something in the wp-blog-header that I need :) because when I don't use it, there is an error. The place I was testing at is: http://www.pink-starr.com/wordpress/pleasework.php

  20. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Can you check that the file

    wp-includes/wp-l10n.php

    correctly uploaded ?
    Can you delete it maybe, and upload a new one ?

  21. Lauren
    Member
    Posted 9 years ago #

    Okay, It was there, but I went ahead and deleted it then reuploaded it.

  22. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Can you post here the first 9 lines of pleasework.php ?
    Post the code between backticks.

  23. Lauren
    Member
    Posted 9 years ago #

    Hmm.. no Idea what backticks are actually. But if I did I could... :P

  24. Mark (podz)
    Support Maven
    Posted 9 years ago #

    ¬ on my keyboard (UK) they are on the same key as ¬

  25. Lauren
    Member
    Posted 9 years ago #

    Ah.. can't find it! Okay, hold on, I'll figure out what it is. ^^

  26. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Check near your 1 key

  27. Lauren
    Member
    Posted 9 years ago #

    <?php
    /* Don't remove this line. */
    require('../header.inc');
    ?>

    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>

    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    <?php
    /* Don't remove this line. */
    require('../footer.inc');
    ?>

    Theres that with the index imbetween right now.

  28. Lauren
    Member
    Posted 9 years ago #

    LoL, yeh, I found it. ^^

  29. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Where is "header.inc" coming from ?
    In order for WP to work, you must have the call to wp-blog-header there. No call to that = much breakage.

    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <?php
    /* Don't remove this line. */
    require('../header.inc');
    ?>

    Unless you already do have this, and I cannot see this above, use what I have just posted.

  30. Lauren
    Member
    Posted 9 years ago #

    Okay, I did that. But it was the same, so I tried adding all of the index. Which is loading, and doesn't look so good so far.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.