Nicholas Ferrell on Nostr: WordPress pages (as opposed to posts) do not have pingback and trackback support by ...
WordPress pages (as opposed to posts) do not have pingback and trackback support by default. I had a need to enable it on The New Leaf Journal in order to allow certain pages to accept incoming Webmentions. In that case, I added the PHP snippet to my child theme’s functions.php file. But with multiple sites and the possibility that I may not always use the same theme, I decided to convert the snippet into a site-specific plugin. The code is available in my personal Gitea repository. Feel free to use and extend (instructions for extending are in the code comments).
#coding #wordpress
https://social.emucafe.org/naferrell/pingbacks-wp-pages/Published at
2023-09-06 18:03:13Event JSON
{
"id": "0dee38a371c90eb8cb841c25e70508d142d12632cd83633e208b27421b52a138",
"pubkey": "3d5c06e426e229b2fe37e8a370e31d351c3e608d0828520f5d2cca3bd6b33fe7",
"created_at": 1694023393,
"kind": 1,
"tags": [
[
"t",
"coding"
],
[
"t",
"wordpress"
],
[
"proxy",
"https://social.emucafe.org/naferrell/pingbacks-wp-pages/",
"activitypub"
]
],
"content": "WordPress pages (as opposed to posts) do not have pingback and trackback support by default. I had a need to enable it on The New Leaf Journal in order to allow certain pages to accept incoming Webmentions. In that case, I added the PHP snippet to my child theme’s functions.php file. But with multiple sites and the possibility that I may not always use the same theme, I decided to convert the snippet into a site-specific plugin. The code is available in my personal Gitea repository. Feel free to use and extend (instructions for extending are in the code comments).\n\n#coding #wordpress\n\nhttps://social.emucafe.org/naferrell/pingbacks-wp-pages/",
"sig": "6163e67e154990ea31974732cc5d4014540fb6c59b442ebe01ffa19da160fc3e246a38a8bbbd4abebee4053b4de6f8d0bd4ce6dc75feeebe7d97835f3c1d2be9"
}