Hi, can I have two different styles (also using different filters) of archives for one type of post?
Actually, I have a job website where we provide different job information to our viewers. Here I want to send notifications to my viewers about a page that contains the jobs that expired in a week (using date filters) as and when it is updated. And also want to maintain a regular job archive.
Please help me out of this situation or any other way to do it. Thanks
Hello,
There are lots of questions in this thread, I am trying to answer them one by one:
Q1) can I have two different styles (also using different filters) of archives for one type of post?
You might consider custom codes, for example:
1) Create two different WordPress Archive:
- archive A
- archive B
https://toolset.com/documentation/getting-started-with-toolset/customize-post-archives/
2) Then use filter hook "wpv_filter_force_wordpress_archive" to setup custom codes to display different WordPress Archive for different cases, see our document:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_force_wordpress_archive
Q2) Here I want to send notifications to my viewers about a page that contains the jobs that expired in a week
There is a built-in feature "Automatic post expiration in Toolset forms" within Toolset Forms plugin:
https://toolset.com/documentation/user-guides/automatic-post-expiration/
You can send the email email notifications when/before posts expire
See screenshot:
https://toolset.com/wp-content/uploads/2014/08/cred-post-expiration-notification-options-1.png
Well, thanks for your support. But I am more concerned about the Q1 to display job posts. Your solution to Q1 is not that easier one.
Let me explain in detail what I want to achieve.
See I have created two post types- Jobs (contains RFG) and Companies and they are related to each other. On a specific page, I want to display the custom fields of Job and Company Posts. Please let me know how to achieve that.
Please elaborate the question with more details:
How do you setup the "specific page"?
If it is single "Job" post, you can display those related RFG items and Company Posts by these:
1) display the custom fields of Job
Toolset repeatable field groups are base on one-to-many relationship, so each item of repeatable field groups is a single post too, you can setup a post view to output related RFG items, see our document:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups
section "Displaying Repeatable Field Groups"
2) Company Posts
if you are using one-to-many relationship between "Companies" and "Jobs", you can follow our document to display related company information:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-one-related-item-parent
section "Displaying one related item (parent)"
If it is many-to-many relationship, please check above document, section "Displaying many related items"
See those specific (single) pages for Jobs and Companies have already been created. What I want at the moment is to create some landing pages containing some custom fields from Job and Company posts like the number of jobs that expired on last week. Hope you understand my point.
Please elaborate the question with more details:
How do you setup the "jobs that expired on last week"?
How do you setup the post type relationship between "Companies" and "Jobs"?
Hi, you can go through my website hidden link.
In every job post, there is a custom field named 'Last Date of Application' which is a date field. This is the basis for our expiration period.
The Companies and Jobs have a one-to-many relationship where One Company can Have Many Jobs. Here are examples of my posts.
Job Posts example: hidden link
Here the Vacancy Details are created from Repeatable Field Groups (RFG) and others are single custom fields.
Company Posts example (for the above-related job post): hidden link
Here the Company details are shown as well as the jobs they have offered (when available) and also the jobs that have expired (when available).
If you require any further detail I am ready to provide you. Thanks.
Thanks for the details, I suggest you try nested views.
For example:
1) Parent post view:
- Query "Job" posts
- Filter by:
Select items with field:
Last Date of Application is a number between PAST_DAY(7), NOW()
this will get all Job posts which are expired in past 7 days
https://toolset.com/documentation/user-guides/date-filters/
- in section "Loop Editor", so within view's loop, the current post is a single "Job" post, you can display below child post view + Parent company post information:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-one-related-item-parent
2) Post view for related RFG items, see our document:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups
section "Displaying Repeatable Field Groups"
For your reference.
I got your point but how to display the nested view on a page not connected with the job posts. I tried putting some shortcodes in the following manner
<codes>[wpv-view name="job-vacancy-details" limit="10" offset="0" orderby="field-last-date-of-application" order="desc"]</codes>
But it generated nothing. You can see the screenshot.
You just need to display the parent post view's shortcode in your landing page:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view
In your screenshot, it shows result: No items found.
It means there isn't any post matching your filter settings, please check the filter setting of view, make sure you are follow our document to setup the filter on custom date field "Last Date of Application".
I have tested it in my localhost, it works fine.
So far I think my filter settings are ok. At the moment I haven't used any date filter. So, naturally, all the data should have reflected on the page. I couldn't understand why things are not showing up. I would appreciate if you enter my system to have a look.
Yes, you are right, if there isn't filter in your view, it should be able to output all job posts, so the problem you mentioned above is abnormal, please try these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again
I have enabled the private message box again, in case you need more assistance for it.
The credentials you provided above is not valid, I get this error:
ERROR: The password you entered for the username Gayat** is incorrect.
Please check it, make sure it is valid, also point out the problem page URL and view URL, thanks
Please check now. Page url: hidden link
Thanks, I can log into your website, will update here if there is any found.