Skip to content
WPCode Library

WPCode Library

Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!

Get WPCode
See all Features

  • Features
    • Code Snippets Library
    • Smart Conditional Logic
    • Advanced Code Revisions
    • Private Cloud Library
    • Marketing Scripts & Conversion Pixels
  • Pricing
  • Snippets Library
  • Help Center
    • Docs
    • Support
  • Blog
  • Login
  • Get WPCode

Snippets library

Browse Snippets
Claim your Free Profile
Add Snippet

Archives: Snippets

Dynamically Change the SEO Title of a Specific Post Before the Metadata is Saved

add_filter( “aioseo_save_post”, “aioseo_filter_post_data” ); function aioseo_filter_post_data( $post ) { if ( 10 === (int) $post->post_id ) { $post->title = ‘Some new title here’; } return $post; }Continue reading

Prevent AIOSEO From Outputting a rel=”prev” Link

add_filter( ‘aioseo_prev_link’, ‘aioseo_filter_prev_link’ ); function aioseo_filter_prev_link( $previous ) { return ”; }Continue reading

Prevent AIOSEO From Outputting a rel=”next” Link

add_filter( ‘aioseo_next_link’, ‘aioseo_filter_next_link’ ); function aioseo_filter_next_link( $next ) { return ”; }Continue reading

Prevent AIOSEO From Outputting any Data on Category Archive Pages

add_filter( ‘aioseo_meta_views’, ‘aioseo_filter_meta_views’ ); function aioseo_filter_meta_views( $views ) { if ( is_category() ) { return []; } return $views; }Continue reading

Change the Post ID Being Processed by AIOSEO

add_filter( ‘aioseo_get_post_id’, ‘aioseo_change_post_id’ ); function aioseo_change_post_id( $postId ) { if( is_post_type_archive( ‘product’ ) ) { $postId = 123; } return $postId; }Continue reading

Disable the AIOSEO Flyout Menu for Non-Administrator Users.

add_filter( ‘aioseo_flyout_menu_enable’, ‘aioseo_filter_flyout_menu_enable’ ); function aioseo_filter_flyout_menu_enable( $enabled ) { if ( ! aioseo()->access->isAdmin() ) { $enabled = false; } return $enabled; }Continue reading

Control Whether AIOSEO Flushes Output Buffer After Rewriting Title

add_filter( ‘aioseo_flush_output_buffer’, ‘__return_false’ );Continue reading

Rerender PDF Viewer when embedded inside Kadence Blocks > Tabs for PDF Embedder Lite

add_action( ‘wp_footer’, static function () { ?>Continue reading

Untitled Snippet

Continue reading

Untitled Snippet

Continue reading

Page navigation

Previous 1 … 111 112 113 114 115 … 255 Next

Company

  • About
  • Careers
  • Testimonials
  • Blog
  • Affiliates
  • Contact
  • Twitter
  • Facebook

Powerful Code Features

  • Ready-made Snippets Library
  • Smart Conditional Logic
  • Advanced Auto-insert Locations
  • Global Header & Footer Scripts
  • Safe Error Handling
  • WordPress Code Generators

  • Ecommerce Conversion Pixels
  • Dynamic Content Elements
  • Reduce Number of Plugins
  • Save Snippets in Cloud
  • Easy Code Management
  • Advanced Code Revisions

Helpful Links

  • Support
  • Documentation
  • Plans & Pricing
  • WordPress Hosting
  • Start a Blog
  • Make a Website

Copyright © 2025 WPCode. WPCode® is a registered trademark of WPCode, LLC

Terms of Service
Privacy Policy
FTC Disclosure
Sitemap
WPCode Coupon

The WordPress® trademark is the intellectual property of the WordPress Foundation. Uses of the WordPress®, names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation. WPCode is not endorsed or owned by, or affiliated with, the WordPress Foundation.

Snippet Preview