Archives: Snippets
Header end footer
/* Style the footer container */ #custom-footer { background-color: #fff; /* White background */ padding: 1px; width: 1200px; max-width: 90%; margin: 0 auto; }Continue reading
Untitled Snippet
Untitled Snippet
Subscriber
https://youtube.com/@R0CKHEMAR?si=1cHo63EBjMpUjblmContinue reading
Html
Charitable Reporting: Adjusting Initial Filters
add_filter( ‘charitable_report_overview_args’, ‘example_charitable_report_overview_defaults’, 999 ); function example_charitable_report_overview_defaults( $defaults = array() ) { // Defaults array contains: // start_date, end_date, filter, campaign_id, category_id. // The $defaults array contains the default values for the report overview. // You can modify these as…Continue reading
Gtag
Remove users from WP-JSON
add_filter(‘rest_endpoints’, function( $endpoints ) { if ( isset( $endpoints[‘/wp/v2/users’] ) ) { unset( $endpoints[‘/wp/v2/users’] ); } if ( isset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ) ) { unset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ); } return $endpoints; });Continue reading
Disable Author Archives
// Return a 404 page for author pages if accessed directly. add_action( ‘template_redirect’, function () { if ( is_author() ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } ); // Remove the author links. add_filter( ‘author_link’, ‘__return_empty_string’, 1000…Continue reading