このページのトップへ
Custom Post Page

Custom Post Page

Create your own customised blog post page.

中級.png

中級

8K

出版された:

January 2, 2020

酒を楽しむ少女

によって

アンカー 1
開発者を雇う

説明例

In this example we customise the default post page by adding elements and extra data.

コード例

タブ1

.

タブ2

.

タブ3

.

このコードによる解決は複雑になる可能性がある。

どのように構築したか

コレクション

For this example we used the database collections automatically added to your site if you have a blog and an additional one of our own:

  • Blog/Posts collection: Contains information about your individual blog posts

  • Blog/Categories collection: Contains information about your blog categories

  • Post Extra Data collection: Contains additional information about your blog posts with references to the original post item in the Blog/Posts collection.

ページ要素

In our site we added the following page elements:

  • Strip: Custom header strip for the post page:

    • Text: Author name 

    • Text: Photographer name 

    • Text: Post title

コード

We added the following code to the Post page:

  • When the Post page loads:

    • Get the current post data using the getPost() function.

    • Retrieve the extra post data using the ID of the current post.

    • Merge the post data with the extra post data using the object.assign() method.

    • Populate the merged data  in the relevant page elements.

使用したAPI

コード以外の例。

コード以外の例。

コード以外の例。

関連記事

記事リンク

開発者を雇う

Veloソリューションは強力なツールですが、自力で構築するのは困難です。経験豊富なVelo開発会社に構築をお任せください。

関連例

これは役に立ったか?

はい

|

いいえ

ご意見ありがとう!

カスタムコメント

カスタムコメント

カスタム投稿コメントセクションの作成

中級.png

初心者

カスタムいいねボタン

カスタムいいねボタン

自分だけの「いいね!」ボタンを作ろう。

中級.png

中級

関連記事

関連記事

Display related posts in your blog post page

中級.png

初心者

アンカー2
ページ下