Add a trailing slash at the end of the category URLs

Short Answer If your category URLs look like /?category=761, you are still on Plain permalinks. Switch to any “pretty” structure (e.g. /%category%/%postname%/) and save—WordPress will output /category/slug/ with the trailing slash. Already on pretty permalinks and the slash is still missing? Add this in a site-specific plugin or Code Snippets: add_filter( ‘category_link’, ‘force_cat_slash’, 10, 2 … Read more

Display content based on multiple URL parameters—pretty URL or query string

you have a little error in the call of add_rewrite_rule with an extra slash before index.php. with this correction, your system works without a CPT like data. you can try that : add_action(‘init’, function () { add_rewrite_rule( ‘^data/([a-z0-9-]+)/([a-z0-9-]+)/([a-z0-9-]+)/?$’, ‘index.php?data_type=$matches[1]&data_action=$matches[2]&data_post_id=$matches[3]’, ‘top’ ); }); add_action(“template_redirect”, function () { $data = []; foreach ([“data_type”, “data_action”, “data_post_id”] as $key) … Read more

shell_exec returns string with “238” removed?

Finally found the solution: One of the title strings contained the letter “ö” (oumlaut). In the shell context, the result of the select was correct, but not in the context of wordpress (maybe different localisation?). So, modifying the page title did the trick.

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