INT
  • Member for 10 years, 10 months
  • Last seen more than a week ago
2 answers
2 votes
2k views
Custom taxonomy term in WooCommerce product permalink
Accepted answer
4 votes

As always it was too simple in the end, was using the wrong hook. post_link is for posts only should use post_type_link instead. /** * replace the '%item%' tag with the first * term slug in the ...

View answer
2 answers
1 votes
186 views
Headless WordPress – Issue with plugin path
Accepted answer
2 votes

My quick and dirty fix looks like this (please note that I use Roots Bedrock, so it differs from a vanilla WP install). In .env add this line WP_HOME_ADMIN='http://admin.mydomain.test' In ...

View answer
2 answers
2 votes
2k views
TinyMCE Autoresize
Accepted answer
2 votes

Here's a solution. There's a slight problem as it does not recognize when images are added to the editor. 1: Create a folder with the name tinymce-autoresize in the plugins folder. 2. Create a file ...

View answer
1 answers
1 votes
97 views
Replication of core column block produces different markup
1 votes

Setting apiVersion: 2 while registering the block resolved this issue.

View answer
3 answers
4 votes
2k views
Make 'Howdy, [name]' function as log out button
1 votes

This should hit the spot: function remove_old_logout() { global $wp_admin_bar; $wp_admin_bar->remove_node('my-account'); } add_action( 'wp_before_admin_bar_render', 'remove_old_logout' ); ...

View answer
1 answers
1 votes
76 views
Using taxonomy term in CPT permalink – Pages 404's
Accepted answer
0 votes

Ended up with commenting out line 4 and changing the filter into this: add_filter('post_type_link', function ( $post_link, $post, $id = 0 ) { if ( 'project' != $post->post_type || 'publish' != ...

View answer
1 answers
0 votes
245 views
Wordpress with static posts page and custom permalink structure doesn't find posts with numeric permalinks
0 votes

With some help I was able to get it working with this: add_action('init', 'journal_urls'); function journal_urls() { add_rewrite_rule( '^journal/([^/]*)$', 'index.php?name=...

View answer
3 answers
0 votes
1k views
Redirect from the dashboard to edit.php if wp_is_mobile() is true
0 votes

Alright, found one solution, although not that elegant. function load_if_mobile() { if ( wp_is_mobile() ) {?> <script> window.location = '/wp-admin/edit.php'; </script&...

View answer
1 answers
1 votes
272 views
Compare string with post id in wpdb and do stuff when match is found
Accepted answer
0 votes

This is what I ended up using, turned out I didn't need to apply the meta value to the child pages since I used another approach. Hopefully it's useful for someone. $row = $wpdb->get_row("SELECT *...

View answer