如何修改WP Job Manager职位列表模板?

发布于 2025-01-12 17:46:57 字数 280 浏览 0 评论 0原文

长话短说 - 使用 [jobs] 短代码时显示的列表项的模板在哪里?

我有一个带有 WP 作业管理器的 WP 网站。我使用 [jobs] 短代码来显示可搜索的职位列表。我需要修改列表的模板以显示工作机会的摘录。我认为显示的模板是 content-job_listing.php,但是当我修改它时没有任何反应。所以我的问题是我似乎找不到正确的模板。

我搜索了整个插件代码,似乎找不到任何与我的页面上显示的 [jobs] 短代码所在的内容无关的内容。

那么您认为这里发生了什么以及我正在寻找的模板通常在哪里?

Long story short - where is the template for the listing list items that are shown when the [jobs] shortcode is used?

I have a WP site with WP Job Manager. I am using the [jobs] shortcode to show a list of the jobs that is searchable. I need to modify the template of the listings to show lets say an excerpt of the job offer. I think the template showing there is the content-job_listing.php, but when I modify it nothing happens. So my problem is I can't seem to find the correct template.

I've searched the whole plugin code and can't seem to find anything remote to what is displayed on my page where the [jobs] shortcode is.

So what is happening here you think and where usually is the template I am looking for?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

み青杉依旧 2025-01-19 17:46:57

content-job_listing.php 是它的正确模板。您使用什么主题?如果您使用的是 WP Job Manager 特定主题(例如 Jobify),那么它们可能有一个自定义模板覆盖插件的模板。然后您必须查看他们的文档以查看哪个文件。

你在哪里编辑文件?在子主题中还是在插件的文件夹中?如果您正在编辑插件文件夹中的文件并且没有看到更改,那么您可能也在子主题中拥有该文件。在这种情况下,子主题优先。

无论如何,您应该仅在子主题中进行更改,而不是在插件文件中进行更改,以确保您的更改是防更新的。也可能是您正在子主题中编辑文件,而该子主题不是 WP 安装中的活动主题?

如果您尚未完成,请查看有关此主题的 WPJM 官方文档:https://wpjobmanager。 com/document/template-overrides/

content-job_listing.php ist the corect template for it. What theme are you using? If you are using a WP Job Manager specific theme like Jobify then they probably have a custom template overriding the plugin's template. Then you'd have to look in their documentation to see which file that is.

Where are you editing the file? In a child theme or in the plugin's folder? If you are editing the file in the plugin's folder and you don't see changes then you probably have the file in a child theme as well. The child theme takes priority in that case.

Anyway you should make changes only in a child theme and not in the plugin files to make sure your changes are update-proof. It could also be that you are editing the file in a child theme which is not the active theme in your WP install?

If you haven't done yet check out the official WPJM documentation on this topic: https://wpjobmanager.com/document/template-overrides/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文