Change user slug in Buddypress
Place the following code in your theme’s functions.php file: add_filter( ‘bp_core_enable_root_profiles’, ‘__return_true’ ); I hope this helps.
Place the following code in your theme’s functions.php file: add_filter( ‘bp_core_enable_root_profiles’, ‘__return_true’ ); I hope this helps.
Have a look at the documentation for the_terms(). It requires at least two parameters – the post ID, and the taxonomy name. You’re not giving it either of these (I am of course assuming your taxonomy isn’t called taxonomy-name). However, you’re also using the wrong function for the situation. the_terms() is used to display (i.e. … Read more
Why are you going to functions.php? Go to Settings > Permalinks and use something/%category% as your Category base
I believe the hook you’re looking for is body_class or post_class filter. These filter will allow you to remove or push classes into an array which will in turn display them on the body tag or post tag respectively. To add the post slug we could do something like this: /** * Add, Remove, and … Read more
Disable the WordPress event plugin. Use following code in functions.php to find your theme has events function. if ( post_type_exists( ‘events’ ) ) { echo ‘the Event post type exists’; }else{ echo ‘the Event post type does not exists’; } If you find theme has events custom post type, find where your theme register the … Read more
Test you the following filter work for you: function wpse245094_fist_duplicate_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) { // slug had to change, we must have a duplicate if ( $original_slug !== $slug ) { // try to replace `-2` with `-es` $new_slug = preg_replace( ‘#-2$#’, ‘-es’, $slug ); if ( $new_slug !== $slug ) … Read more
I haven’t tried this myself yet – and I would probably always prefer to go with the default ‘products’ for compatibility reasons… However it should be very well possible to add your own CPT to WooCommerce and then “move” all products to that new CPT. First you’ll have to add a CPT to your WordPress installation that … Read more
WordPress 4.5 introduced the functions unregister_post_type() and unregister_taxonomy(). You could deregister your post type respectively taxonomy and register them again with your custom settings. The post type is still named portfolio. You could rename it, but you would probably have to check your template files for references. add_action(‘init’, ‘wpse_247924_overwrite_theme_post_types’, 1000); function wpse_247924_overwrite_theme_post_types() { unregister_post_type( ‘portfolio’ … Read more
What you are asking would make those pages NOT be the home page, at least in WordPress’s definition of the homepage. If you want people to go straight to /some-page and not be able to access the root, then you would create a 301 redirect for this (but there will still technically be something on … Read more
I guess the problem is here. $slug = $term->slug; $explodedSlug = explode(‘-‘, $_slug); you are passing an undefined array $_slug to explode function. the correct array is $slug. so your complete code should be something like below. function revised_featured_courses_query() { $meta_query = WC()->query->get_meta_query(); $tax_query = WC()->query->get_tax_query(); $tax_query[] = array( ‘taxonomy’ => ‘product_visibility’, ‘field’ => ‘name’, … Read more