Get nice name of category from slug (remove dashes of category)
I’m a sucker for regular expressions: <?php $category = ‘test-category’; $category = preg_replace(‘/-/’, ‘ ‘, $category); $category = ucwords($category); echo $category;
I’m a sucker for regular expressions: <?php $category = ‘test-category’; $category = preg_replace(‘/-/’, ‘ ‘, $category); $category = ucwords($category); echo $category;
Add a parameter at the end of the url and prettify
This should be a comment but I have not enough reputation yet, sorry for that… As Jacob said in his comment this is the normal behaviour. However this issue has already been discussed many times. Check this Q/A as an example: https://stackoverflow.com/questions/17798815/remove-category-tag-base-from-wordpress-url-without-a-plugin
Found the solution, just had to remember all the ? marks. It works when the regex is like this: ‘index.php?catalogs=$matches[1]&p1=$matches[2]&p2=$matches[3]&p3=$matches[4]’
WordPress is inlining the style as an optimisation: When a page gets rendered, stylesheets that have opted-in to get inlined get added to an array. Their size is retrieved using a filesize call (which is why the path data is necessary), and the array is then ordered by ascending size (smaller to larger stylesheet). We … Read more
Prepend to all image URLs with PHP, only for mobile devices
Use a plugin like this to override the permalink structures on each post, post type or any other entry: https://wordpress.org/plugins/permalink-manager/
Too many redirects (ERR_TOO_MANY_REDIRECTS) only on one page
There is an option for adding custom structure you can select the checkbox and Permalink is generated like this example.com/article2. and there is also a product permalink that is also customizable. Edit There is an option for setting permalink in WordPress setting you can select “post name” check box for getting only post name in … Read more
Allow two posts (from different categories) to have the same slug