SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > jetpack > modules > related-posts


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/jetpack/modules/related-posts

NameTypeSizeLast ModifiedActions
rtl Directory - -
class.related-posts-customize.php File 9235 bytes January 20 2025 22:16:12.
jetpack-related-posts.php File 70401 bytes June 16 2025 23:21:40.
readme.md File 1411 bytes May 30 2023 21:03:32.
related-posts-customizer.js File 734 bytes July 28 2020 21:06:48.
related-posts-rtl.css File 5804 bytes April 28 2025 19:38:34.
related-posts.css File 7482 bytes April 28 2025 19:38:34.
related-posts.js File 10428 bytes December 16 2024 19:21:56.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/jetpack/modules/related-posts/readme.md

# Related Posts

The basic code flow for Related Posts (legacy version) is:

1. Generate an empty DIV to be added to the page.
2. Make an API call to get the working post IDs.
3. Call `get_related_post_data_for_post()` for each ID.
4. Use generated data to update the DIV once page load is complete.

For the block-based version:

1. Make an API call to get the working post IDs.
2. Call `get_related_post_data_for_post()` for each ID.
3. Use generated data to render the block when called.

## Prerequisites

If using a block theme, the site-wide Related Posts setting will be ignored. For other themes, the site-wide setting is honored as long as a Related Posts block or shortcode is not found on the page. The Related Posts code paths will only output once per page.

In both cases, the feature needs to be turned on in the Jetpack settings. This makes sense for the legacy widget but can be a bit confusing for the block. It will not be visible in the block "picker" until enabled.

## API Usage

The block depends on wpcom for the working post IDs. See `get_related_post_ids()` for details. The returned data should look like this:

```
[{"id":919},{"id":9},{"id":903}]
```

Note the data used in rendering is all generated locally once the post IDs have been provided.

## Block Source

The source for the Gutenberg block lives separately at:

`projects/plugins/jetpack/extensions/blocks/related-posts/`

SILENT KILLER Tool