AL Guevara
Forum Replies Created
-
Forum: Plugins
In reply to: [404 to 301 - Redirect, Log and Notify 404 Errors] v3.0.0 betaJoel James?
Forum: Plugins
In reply to: [Code Snippets] page exclude function not workingHi Jeremy
I did post at Jetpack, but because I was using CS to implement the EXCLUDE, I posted here also.Can you explain how I do a “global snippet” please?
Thanks
- This reply was modified 7 years, 11 months ago by AL Guevara.
Forum: Plugins
In reply to: [Code Snippets] page exclude function not workingglobal snippet?
Forum: Plugins
In reply to: [Code Snippets] page exclude function not workingThank you Shea.
Strangely enough after a nite of sleep, the EXCLUDE is working now.
No more
https://apschipsealingpaving.com/z-example-html-page/
and the sitemap.
https://apschipsealingpaving.com/sitemap.xmlMust have something to do with the “cacheing?”
Strange, cause last nite I tried:
- Private windows.
- Closing FF/Chrome and re-opening
- Even Rebooting to boxes
- To no avail
Glad its working, but baffled I remain, and I bet/suspect its not CS at all, but the cacheing functions of Jetpack/Sitemap.
Thanks Shea
Forum: Plugins
In reply to: [Code Snippets] page exclude function not workingid #72 page is:
https://apschipsealingpaving.com/z-example-html-page/Thanks Jeremy.
I’ll try again.
Even Weirder, I delete the code, save the functions file, and page is still gone from sitemap. Getting baffling
Very strange, though I had to do the DB restore to yesterday, the code is now in the chnild thme function file, the same code that crashed the site.
function jeherve_exclude_post_sitemap( $skip, $post ) { if ( '72' == $post->ID ) { $skip = true; } else { $skip = false; } return $skip; } add_filter( 'jetpack_sitemap_skip_post', 'jeherve_exclude_post_sitemap', 10, 2 );
HOLD OFF ANSWERING JEREMY.
Strange, I had to do a wp db restore to get site back up, and then the page I wanted excluded (ID=72) was now excluded on site map
https://apschipsealingpaving.com/sitemap.xml
Page I wanted excluded (ID=72)
https://apschipsealingpaving.com/z-example-html-page/The code Im using.
function jeherve_exclude_post_sitemap( $skip, $post ) { if ( '72' == $post->ID ) { $skip = true; } else { $skip = false; } return $skip; } add_filter( 'jetpack_sitemap_skip_post', 'jeherve_exclude_post_sitemap', 10, 2 );
Also, adding your code to the child themes fucntions file caused a siter error.
ERROR:
Fatal error: Cannot redeclare jeherve_exclude_post_sitemap() (previously declared in /home/content/a2pewpnas01_data01/05/3958905/html/wp-content/plugins/code-snippets/php/snippet-ops.php(384) : eval()’d code:1) in /home/content/a2pewpnas01_data01/05/3958905/html/wp-content/themes/generatepress-child-theme-01/functions.php on line 37Hi Jeremy. It It did not work.
I’m using the “code-snippets” plugin by the way to insert into functions file.
https://www.ads-software.com/plugins/code-snippets/See screenshots below showing page ID=72 in code, but still showing up in the sitemap. Any suggestions?
Forum: Plugins
In reply to: [404 to 301 - Redirect, Log and Notify 404 Errors] Unintentional redirectWait on Joel, Im, not that sophisticated.
Forum: Plugins
In reply to: [404 to 301 - Redirect, Log and Notify 404 Errors] Unintentional redirectUpdate 404-301 plugin
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Columns Inside ColumnsIm reposting, this was never been answered in 10 months.