-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the display-posts-shortcode-remote wiki!
- Introduction
- Installation
- Usage
- Support and Contributions
The plugin was forked from Display-Posts-Shortcode-Remote, modified, and customized by the Webcom team to add functionality and styles that did not exist in the original plugin.
You can download the plugin from here and install it directly into your WordPress or clone the display-posts-shortcode-remote repository into your local development environment within your WordPress installation's plugins/ directory:
git clone https://github.com/UCF/display-posts-shortcode-remote
- WordPress installation
- bootstrap
- You need to include the stylesheet by adding it to your theme or by adding it as custom CSS.download style sheet
To display posts from a remote WordPress website on your frontend, utilize the provided Shortcode.[display-posts-remote]
In order to fully leverage the advantages of using this shortcode, it is essential to utilize the following attributes:
Attribute | Description | Example |
---|---|---|
url |
URL needs to be provided in order to pull from remote. Note that you don't need to include https:// or http:// at the beginning of the URL, and also you must not add 'wp-json/wp/v2/posts' at the end of the URL. |
[display-posts-remote url="www.ucf.edu/research"] |
cache_timeout |
Cache timeout is responsible for caching posts to reduce load time and prevent sending new requests to the API. If you want to clear the cache, assign it to 0 . |
[display-posts-remote cache_timeout="0"] |
include_excerpt |
Excerpt will be shown if the attribute is assigned to true. Note that if posts include a custom excerpt, it will be pulled; otherwise, the shortcode will generate an excerpt from the content of the post. | [display-posts-remote include_excerpt="true"] |
excerpt_length |
It is essential to limit the number of characters we want to show in front of each post. We suggest using a positive number between 10 to 20 . |
[display-posts-remote include_excerpt="true" excerpt_length="10"] |
image_size |
The size of the image. Currently, the only size available is thumbnail . We will provide any updates in the future here. |
[display-posts-remote image_size="thumbnail"] |
wrapper |
It's the container of all of the posts. You can use div , li , or ol (we suggest using div ). |
[display-posts-remote wrapper="div"] |
wrapper_class |
Ability to pass classes to the container. For now, it's essential to pass 'image-left' , but you can add whatever classes you like. |
[display-posts-remote wrapper_class="image-left"] |
posts_per_page |
One of the most important attributes to limit the number of posts pulled from APIs. By default, we pull 10 posts, but we suggest using a number between 4 to 6 . |
[display-posts-remote posts_per_page="4"] |
So in summary, your shortcode will be like this:
[display-posts-remote url="www.ucf.edu/research" cache_timeout="0" include_excerpt="true" excerpt_length="10" image_size="thumbnail" wrapper="div" wrapper_class="image-left" posts_per_page="4" ]
For support, issues, or inquiries, please submit a GitHub issue or contact our support team. Contributions to the development of the Vertical Slide Plugin are welcome! Feel free to fork this repository and submit pull requests.