Remove content links (internal and external), but exclude post at specific categories

To exclude certain categories from the filter function that removes links from the post content, you can modify the function to check the categories of the post before removing the links. Here is an example of how you can modify the function to exclude certain categories: add_filter(‘the_content’, ‘removelink_content’,1); function removelink_content($content=””) { // Get the categories … Read more

Can’t send form data to wpdb when URL has query string

I see a few issues with the code: First, the form action is not set correctly. It should be something like: <form action=”<?php echo esc_url( get_the_permalink() ); ?>” method=”post”> In the PHP code, you are using the wrong table name. You are using the table name ‘invites’ instead of ‘rsvp’. You should change this line: … Read more

Edit Error Page style

The _default_wp_die_handler function is responsible for outputing the CSS you’re seeing, and whilst the callback function is hookable(see wp_die_handler), meaning you could use your own callback in it’s place, it seems a bit much to be copying and modifying the whole handler just to tweak some CSS. There are barely any hooks in this function … Read more

Execute multiple PHP Snippets causes error?

Maybe I’m misunderstanding something, and it’s still not clear to me how you’re using this code, but it seems like a straightforward PHP error. You can’t declare an independent function with the same name twice. You declare (or define) the function with the function function_name() only once, and then you can call it by name. … Read more