Not Excluding Specified Posts
-
Hi Jeremy,
Wondering if you might be able to help?
We have two (very similar) web sites:
LakePath.com (real estate listings)
LeLacAppelle.com (housing development)They are both running:
WordPress 4.9.8
Latest JetPack and All other Plugins
REST API Post Embeds v1.4.1
Same TwentyFourteen Theme/Child (with a few minor exceptions)
Same Plugins (with a few minor exceptions)Overview/Issue:
LakePath pulls in Blog Posts from LeLac in the left sidebar. You helped me set it up for randomizing the posts every 10 minutes and it’s been working very nicely.However, the Posts that I’ve excluded in the Widget Code continue to be displayed. I noticed this some time ago (maybe 4+- months ago), but never looked into it, so I don’t think it’s because of any recent WordPress or Plugin Updates.
When you get a chance, can you take a look at the Widget & Child/Function Code below and let me know what I’m missing?
As always, thanks in advance for any insight you might provide.
John
****************************************************************************ON LakePath.com Site:
WIDGET: Recent Posts From Le Lac Appelle… The Lake Is Calling
[jeherve_post_embed url=”lelacappelle.com” wpapi=true include_images=”true” order_by=”rand” number=”5″ image_size=”202,114″ include_credits=”false” include_excerpt=”false” category=”Lake Moments” exclude=890,1427,1580,1884]CHILD THEME FUNCTION.PHP:
/* JRN Note Changes default cache of 10 minutes to refresh posts */ /* was 3. changed to 10 on 6/24/17 8:20am */ function jeherve_custom_api_embeds_caching() { return 10 * MINUTE_IN_SECONDS; } add_filter( 'jeherve_post_embed_posts_cache', 'jeherve_custom_api_embeds_caching' ); /* JRN Note Jeremy had me add to fix rand sort */ add_filter( 'rest_post_collection_params', 'my_prefix_add_rest_orderby_params', 10, 1 ); function my_prefix_add_rest_orderby_params( $params ) { $params['orderby']['enum'][] = 'rand'; return $params; }
*******************************************************************
ON LeLacAppelle.com Site:
WIDGET: Not used at LeLac
CHILD THEME FUNCTIONS.PHP:
/* JRN Note Changes default cache of 10 minutes to refresh posts */ /* was 3. changed to 10 on 6/24/17 8:20am */ function jeherve_custom_api_embeds_caching() { return 10 * MINUTE_IN_SECONDS; } add_filter( 'jeherve_post_embed_posts_cache', 'jeherve_custom_api_embeds_caching' ); /* JRN Note Jeremy had me add to fix rand sort */ add_filter( 'rest_post_collection_params', 'my_prefix_add_rest_orderby_params', 10, 1 ); function my_prefix_add_rest_orderby_params( $params ) { $params['orderby']['enum'][] = 'rand'; return $params; }
The page I need help with: [log in to see the link]
- The topic ‘Not Excluding Specified Posts’ is closed to new replies.