21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 355 Views |
-
Read in blog posts from Wordpress but keep wp-admin

8 November 2012 at 12:52am
Hi everyone
I am building a new site which has an existing wordpress blog. The client wants to keep the admin system for their wordpress blog (there is no movement on thats, its 100% they want it). So I want to build something in SS3 than will read only (i.e. not store in the database) blog posts from their wordpress database and show up in the silverstripe front end (i.e. admin of SS wont see any of the blog posts, they just see a page holder called BlogHolderWP or something).
Any ideas on how I could go about this, as it means connecting to another database, etc?
Thanks for any ideas!
-
Re: Read in blog posts from Wordpress but keep wp-admin

8 November 2012 at 1:11am
You can use rss from the wordpress blog to be displayed on your silverstripe site
-
Re: Read in blog posts from Wordpress but keep wp-admin

8 November 2012 at 1:13am
Aer there any examples of this working, including bringing in tags, comments, etc?
-
Re: Read in blog posts from Wordpress but keep wp-admin

8 November 2012 at 3:32am
For anyone who is also interested I have found the solution!
1. Create a folder "blog" in the root of you site, put the wordpress files in there
2. Import the existing WP database and set up, plus manage config variables in the WP database to point to yoursite.com/blog
3. Update the blog/.htaccess file to...# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule># END WordPress
4. Update the SS3 .htaccess to
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files><Files web.config>
Order deny,allow
Deny from all
</Files>ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html<IfModule mod_alias.c>
RedirectMatch 403 /silverstripe-cache(/|$)
</IfModule><IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteBase '/'RewriteCond %{REQUEST_URI} !^blog/(.*)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L]</IfModule>
### SILVERSTRIPE END ###5. Theme your WP install with the same as your SS site
6. Use the RSS Reader widget to pull in latest blog posts from your WP blog installHappy blog'in!
| 355 Views | ||
|
Page:
1
|
Go to Top |


