I have a view which is inserted into theme index page (frontpage) template using <?php echo do_shortcode ('[wpv-view name="myviewname"]'); ?>
The most recent post is missing in the view. But the exact same view shows it correctly when it is on a Page or in a Post. So there must be an issue causing this when the view is on the frontpage?
It used to work on the frontpage showing all posts including the most recent. But it seems changes in WP-View after version 1.9 is the reason.
I have narrowed it down to the wp-views\embedded\inc\wpv-filter-post-types-embedded.php if I replace that file with the wpv-filter-post-types-embedded.php from WP-Views 1.9 the most recent post appears in the view again on the frontpage.
More specific it seems to be something in this code in wpv-filter-post-types-embedded.php
I have removed it and loaded the front page and added it again. No change. Do not think it is caching since making the code change I mentioned in my first post fixes it. You can try doing it perhaps and verify?
Thats correct but since it works completely fine on another page even when the original code is there then I wouldnt suspect that it was this code that is causing the problem.
To ensure that its not a bug with the plugin could you temporarily disable your non-toolset plugins as well as switch your theme to a default on and try again.
This is just for testing purposes to see if the new post will show up.
I have disabled all plugins but types and views and installed Twenty Sixteen theme and edited the index.php of the theme to add the view <?php echo do_shortcode ('[wpv-view name="myviewname"]'); ?>
Still the difference is there, missing the latest post on the frontpage
I have just inserted into the theme index.php (Twenty Sixteen theme) via the code editor. If I change the front page to show A static page (The page with the same View shortcode) the most recent post is shown. I have done that now as you perhaps can see.
There is not a editor in my regular theme for the front page no.
I switched to Twenty Sixteen theme back in reply #450743 so yes the same issue with the theme with do shortcode. And it is only the latest post which is missing unless I do the code change stated in my first post.
So I can only conclude:
-not a plugin conflict
-not a theme issue
If there is no issues in doing the code change to the old View 1.9 wpv-filter-post-types-embedded.php code I can continue to do this with each Views update but seems strange that the newer Views versions has this problem for me does it not?
I thought about doing a discover-wp.com site test to see if I could replicate the problem there too but I do not think I can do a theme edit there to add the do shortcode to the frontpage.
I have been able to replicate the same problem on a different site I have. Any chance that you or one on your team can do a simple view test with theme insertion of do shortcode on the index / frontpage to see if you can replicate the problem?
I have just done a fresh install of Types and Views on a third site of mine diffrent webserver too in fact.
1. Set up a simple view showing latest posts titled (Test 1, Test 2, Test 3)
2. Inserted the <?php echo do_shortcode('[wpv-view name="testview"]'); ?> inside the index of the Twenty Fifteen theme.
It is exactly the same issue only Test 1 and Test 2 is shown. The most recent post is missing so I am out of ideas if you cannot replicate it 🙁
If you have no other ideas I will just continue to do the code edit with the old Views 1.9. Let me know what you think.