How to change content hash value, within the_block_template_skip_link action?

If remove_action( ‘wp_footer’, ‘the_block_template_skip_link’ ) did not work, then try with remove_action( ‘wp_enqueue_scripts’, ‘wp_enqueue_block_template_skip_link’ );, or both of that. (see source on GitHub) As for changing the href value, I’m not aware of any (filter) hook to do that, but you can either edit your template and set the <main>‘s id value to content-top, or … Read more

posts_results filter – additional sort, with a meta value, to move posts to the end of the results, with pagination working

Okay, so why doesn’t this work: The Filter you are using is the posts_results, which is a filter that is applied AFTER the Results are retrieved from the database. Which has the problem that you are describing: Ordering happens on a page-per-page basis. What you want to do is add an order TO the SQL-Query, … Read more

Remove rel=”ugc” from links in comments

The rel=ugc is added by a default filter on pre_comment_content. You can disable this by adding the following line to your functions.php: remove_filter (‘pre_comment_content’, ‘wp_rel_ugc’, 20); This may not be wise. If at some point you change your mind, you would have to go through all comments to add it. It is problably better to … Read more

How can I conditionally add the filter option_home?

Assuming that if wp_sitemaps_enabled has a filter and it has that because we wanted to set it to false, otherwise it defaults to true for public sites. So I would just use and check whether it is filtered or not: add_filter( ‘wp_sitemaps_enabled’, ‘__return_false’ ); if (has_filter( ‘wp_sitemaps_enabled’) === true) { add_filter(‘option_home’, ‘any_callback_function’); } else { … Read more

Using the REST API filter, including two meta_queries breaks the response for one custom post type

Oddly, the cause of the problem seems to be the quotation marks around the comparison parameter. For example filter[meta_query][0][compare]=%27=%27 now needs to be filter[meta_query][0][compare]==. When only matching one meta value, this is not necessary, when matching two, this is, now, necessary. :/ Update: I realised that my hosting provider changed the version of Linux on … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)