HI,
I built a group of custom fields and I would like to assign it on the page with the homepage template.
The group of fields appears well when I don't affect a model but then it appears on all pages and when I check the model of my page 'homepage' it no longer appears. (see screenshot)
Thanks a lot for your support
Olivier Foguenne
Dear Olivier,
The problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) Edit the problem page again, click link "Screen options", make sure you have enabled the custom field group option "Home"
3) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again
Dear Luo,
I have loaded the latest version of toolset.
I attributed the model 'homepage' which is a custom model on the screen option of the fields group.
I do not understand where the problem comes from?
I use version 5 of wordpress...
Thanks a lot
Olivier
It might be a compatibility problem of your website, please try as I mentioned above:
deactivate other plugins, and switch to wordpress default theme 2019, and test again
If you need assistance to locate the problem, please provide a copy of your website, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I am downloading the files, will update here if there is anything found
I have tried your website duplicator package in my localhost, with below steps, please correct me if there is anything missing:
1) Login to dashboard
2) Edit the page "Home"
3) In section "Attributs de page", choose option "homepage", click "Update" button, I can see the custom fields settings, see screenshot bati.JPG
4) Refresh the page again, the "Attributs de page" setting lost, it reverse back to option "Modèle par défaut"
And according to wordpress document:
https://developer.wordpress.org/themes/basics/template-hierarchy/#home-page-display
If home.php does not exist, WordPress will use index.php.
Wordpress will use theme file "index.php "as the homepage template, you don't need to assign the template file "index.php" for your home page
Dear Luo,
when you check all conditions must be met, the custom field group no longer appears. (see screenshot)
I want the group of fields to appear only on the homepage and not on all pages.
Thanks for your help.
Olivier
There isn't such a feature to display group of fields to appear only on the homepage, as a workaround, I suggest you try these:
1) Create another field group, for example "Is home page"
Add only one custom checkbox field, for example "Is home page checkbox":
- Value to store 1
2) Edit the custom field group "Home", in section "Settings for Home", add a condition:
is home page checkbox = 1
Then "Home" field group will be display only when you enable the "Is home page checkbox"
And you don't need to choose page for the "Home" page, it will use theme file index.php automatically, see the document I mentioned above:
https://developer.wordpress.org/themes/basics/template-hierarchy/#home-page-display
it seems there is big bug.
Let me explain.
I created a diaporma that appears on the home page, it displays a group of repeated fields. (picture).
But when I create new pages in the admin, it shows me an empty image field in my slideshow. As if custom fields exist without being displayed in all pages.
Please elaborate the new question with more details:
I created a diaporma that appears on the home page, it displays a group of repeated fields. (picture).... it shows me an empty image field in my slideshow.
How and where do you setup the diaporma? how and where do you setup the slideshow?
I need detail steps to duplicate the same problem,
In your duplicator package, I don't see the diaporma and slideshow, see screenshot home.JPG
If it is another new question, we prefer new ticket for it, that will help other users to find the answers.
- The slideshow is created in the view called 'diaporama'.
- The slideshow is displayed on the homepage of my site.
- The slideshow displays the images of the group of fields called 'home'.
- The fields group 'home' is displayed only on the home page.
- The slideshow works fine when there is only one page on the site.
- But when I add a page, he creates a new empty image in my slideshow.
Olivier
You can see the page here hidden link
Since you only want to display pages with "Diaporama" field, so you can edit your post view "Diaporama", in section "Query Filter", add below filter:
Select items with field:
Diaporama is a string different from
It will retrieve pages with "Diaporama" field.
And test again, it works fine in my localhost with your duplicator package, see screenshot slidersshow.JPG
And for the multiple instance field, I suggest you use [wpv-for-each] to display it, see our document:
hidden link
Since it is a new problem, if you need more assistance for it, new ticket please. thanks
OK,
I do not understand what I have to put in the qury filter. (see capture )
Yes, you are right, just leave the value input empty, and test again.
It means query posts with "Diaporama" fields value are not empty
More help:
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/