簡體   English   中英

如何將Wordpress博客嵌入網站?

[英]How to embed a Wordpress blog into a website?

希望有人能幫忙。 我正在建立一個簡單的簡歷網站,其中包括一個Wordpress博客。 我確實將其用作臨時解決方案,但這在iPhone上效果不佳。 我已經看到了有關php的解決方案,但是由於沒有php的經驗,所以我不知道從哪里開始。 我到目前為止在網上看到的內容並沒有真正給出有關如何使用php方法的任何逐步說明。 任何幫助,將不勝感激。

            <!DOCTYPE html>
            <html lang="en">
            <head>
            <meta charset=utf-8>
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title></title>


            <link rel="stylesheet" href="http://keeleyknight.com/styles.css">
            <link href='http://fonts.googleapis.com/css?family=Quattrocento+Sans' rel='stylesheet' type='text/css'>
            <script src="http://keeleyknight.com/_js/jquery-1.9.0.min.js"></script>
            <script type="text/javascript" src="http://keeleyknight.com/_js/modernizr.custom.86080.js"></script>
            <script src="_js/myscripts.js"></script>

            </head>

            <body>

            <div id="wrapper">
                <div id="content">
                    <div class="kk_background">
                        <div class="container">
                            <div class="blog">
                                <div class="contact_content">
                                    Blog Goes here

                                </div>
                            </div>
                        </div>
                    </div>
                </div>   
                <!-- / Homepage -->


            </div>
            </body>
            </html>

您可以在wordpress中使用 word press插件,並可以使用PHP Guzzle庫獲取帖子,如下所示

$client = new \GuzzleHttp\Client();
$response = $client->get("http://domain.com/wp-json/posts?filter[category_name]=test", array('auth' => ['username','password']));
$posts = $response->json(); 

並以您想要的方式在您的網站中呈現帖子。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM