Remove /category/ from category (archive) page URLs (without using a plugin)

Please add this code in functions.php to remove the “category” text from permalink. function remove_category( $string, $type ) { if ( $type != ‘single’ && $type == ‘category’ && ( strpos( $string, ‘category’ ) !== false ) ){ $url_without_category = str_replace( “/category/”, “/”, $string ); return trailingslashit( $url_without_category ); } return $string; } add_filter( ‘user_trailingslashit’, … Read more

HTML link within my plugin settings page

Just use old simple HTML, the <a> tag. <a href=”https://wordpress.stackexchange.com/questions/24208/admin.php?page=yourplugin/another-page.php” title=”another page”>Another Page</a> If your page is php only: echo ‘<a href=”https://wordpress.stackexchange.com/questions/24208/admin.php?page=yourplugin/another-page.php” title=”another page”>Another Page</a>’; Where yourplugin is your plugin folder name, and another-page.php is that other page.

map urls to plugins

The general implementation of such “pretty” permalinks in WordPress is realm of WP Rewrite. However it is pretty wide topic and low level code is a bit of abomination. I would say these are three most common techniques for it, complexity ascending: Use WordPress native data structures (such as Custom Post Types and/or Taxonomies) and … Read more

Whats wrong with my code? Need To add String to shortcode? [closed]

$special_id = ‘ . do_shortcode(‘[url_path_number]’)’ ; Is completely wrong. do_shortcode() is a function and shouldn’t be inside quotes, because that just makes a string that says “do_shortcode()”. I don’t even know what you’re trying to do with the dot at the beginning. $special_id = do_shortcode(‘[url_path_number]’); Is correct.

apply styling only to a specific url

Why don’t you add a class to body via functions if you are on that url, so you can use that class on css, like so: function add_class_to_body($classes) { if(is_page(‘events’)){ $classes[] = ‘page-events’; return $classes; } } add_filter(‘body_class’,’add_class_to_body’); Then you are able to target through .page-events div{ background-color: red; }

WP Job Manger change jobs url (NOT slug)

If you check out the output() method in the includes/admin/class-wp-job-manager-setup.php file, namely this part: /** * Output addons page */ public function output() { $step = ! empty( $_GET[‘step’] ) ? absint( $_GET[‘step’] ) : 1; if ( 3 === $step && ! empty( $_POST ) ) { $create_pages = isset( $_POST[‘wp-job-manager-create-page’] ) ? $_POST[‘wp-job-manager-create-page’] … Read more