Hide wordpress source code
Hide wordpress source code
Hide wordpress source code
How can I put WordPress in a directory but keep just the home page at the domain root?
There is how to change url domain on some posts?
Sure, you only need to concatenate it again. Try: echo ‘<a href=”‘ . esc_url( $link ) . ‘”>’ . $link . ‘</a>’;
Rewrite rule not working, suspect redirect string
Your taxonomy is set to ‘hierarchical’ => true, do you have the post included in both the parent and child category? If you untick the parent category and only tick sub-category then it should use the first URL only.
you can try with this plugin (or see its code) https://wordpress.org/plugins/wp-better-permalinks/ It allows you change the custom friendly permalinks structure to Custom Post Type > Taxonomy > Post and Custom Post Type > Taxonomy instead of default WordPress structure. it Provides different permalinks structure pattern: Custom Post Type > Single Term (or Term tree) > … Read more
I don’t have much experience with coding rewrites, but could you just add $post->post_name into your return statement? return home_url(‘equipment/’ . $post->ID . ‘-‘ . $post->post_name ); There are a few other ways to change the permalinks that I have used that may also help you: The easiest way to change your permalink structure is … Read more
Well… I didn’t know that the expressions in the rewrite attribute of CPT must be registered in advance: add_rewrite_tag(‘%baz%’, ‘([^&/]+)’);
i found out what i was doing wrong, i used this part like i mentioned add_filter( ‘request’, ‘wpse5742_request’ ); function wpse5742_request( $query_vars ) { if ( array_key_exists( ‘author_name’, $query_vars ) ) { global $wpdb; $author_id = $wpdb->get_var( $wpdb->prepare( “SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key=’nickname’ AND meta_value = %s”, $query_vars[‘author_name’] ) ); if ( $author_id ) … Read more