How to integrate a Wordpress blog into an existing website

I have an existing website at http://pokobrosapps.com . Now I have created a Wordpress blog with twenty four template. Now I want to take this Wordpress blog and integrate into my existing website. Then, as soon as I can access the Wordpress blog through my site, set up the Wordpress blog so that it looks exactly like my existing website. I went through many different websites and tutorials and none of them worked because they were outdated.

** UPDATE **

I managed to integrate my blog, but I still need to customize it. I put my blog files in a subfolder called blog. I can access the blog at http://myurl.com/blog

I am still trying to figure out how to set it up with a custom header and footer to fit in with the rest of the site.

+3


source to share


6 answers


I'm not sure I understood your problem, but I'm trying to help you :)

I think the best thing you can do is create your own WordPress theme. This will be easy if you only want to show blog posts and don't need a navigation solution, additional widgets, special plugins, etc. that WordPress can provide you as a feature.

For the sake of simplicity, I'll tell you a possible solution very briefly:



  • Copy the whole twenty-fourth theme ( /wp-content/themes/twentyfourteen

    ) to a new directory in a directory /wp-content/themes

    (for example /wp-content/themes/my_theme

    ).
  • Rename the new theme and if you want to add some copyright information (all you have to do is edit the header of the style.css file in this new directory ... you can keep the link it made after the original theme twenty-fourth)
  • Select a new theme from WordPress admin (as menu / theme) and apply as default.
  • You can edit header.php and footer.php so that it displays your own headers and footers (css, javascript, navigation menus and other stuff) and removes whatever you don't need.
  • You may need to modify your index.php slightly (for example, remove the line get_sidebar();

    and / or <?php get_sidebar( 'content' ); ?>

    from its end if you don't want to use the Wordpress sidebar)
  • Now the default functions should work already ... Maybe you need to pimp a bit for the search and archive functions. I think all you have to do is edit or delete some files from the new template: eg. archive.php, search.php (if you removed search.php the search results will use index.php instead ... Pretty nice return logic ... If you are not familiar with this, please check it out here: http: / /codex.wordpress.org/images/1/18/Template_Hierarchy.png )

If you manage to follow these steps, WordPress will show your header, your css files, your scripts, footer, but the blog will be hosted as the body of the content. Now you can customize everything you need.

I hope these ideas get you off to a good start :) If you need more information, let me know!

+5


source


One possible solution:

  • Your site in: public_html /
  • Your Wordpress blog at: public_html / blog


Add link to your website in public_html / blog /

There is only one page installed in Wordpress, this will be your blog. Put your blog page as your WordPress homepage and disable the wordpress menu

+4


source


Check the folder blog/wp-content/themes/my_theme

and you can edit your header.php files and footer.php files to customize.

+3


source


In fact, you could do something in an easier way. First, you need to have a header, footer, and index. This can be done in different ways, most of them are:

a) get the theme you like and adapt to your needs

b) create your own theme (as suggested)

c) add the theme to a subfolder (just like you)

d) be more complex and call the header from your homepage without WP.

Now, just use the incredible power of WordPress and create all your pages inside Wordpress. Create a category called "Blog" and assign blog categories to it. Depending on the theme you choose, you can only have a "blog" category listed on the homepage, a static page, a menu link to the blog category (and on that page, a list of posts in the blog category), or just about any opportunity you could dream of ... Basically, there is no need to complicate life, you can have it all in a simple installation and then have a CMS for all your pages, forget about double installation and the like, no need at all

+1


source


an easy way to solve your problem to get basic navigation to your worpress blog maybe.

go to page blog/wp-content/themes/my_theme/header.php

remove all content from it and then just add

include_once('file path to the main site header.php');

to a file, this will just download the header from your main site and the navigation will be the same.

Another profit to do this, as I suggested, is that if you make any changes to the main navigation of the site, it will also be shown on the blog, and you don't need to open any files from the blog to show those changes.

You can do the same for the footer.

Here you are viewing the blog content already in the middle of the page

+1


source


If you only want the body of a blog, why not just use The Loop

http://codex.wordpress.org/The_Loop

specially

define( 'WP_USE_THEMES', false );
require('/wp-blog-header.php');

if ( have_posts() ) {
    while ( have_posts() ) {
        the_post(); 
        //
        // Post Content here
        //
    } // end while
 }// end if

      

+1


source







All Articles