Changing WP_Query params with url Query Var

This code manually sets the order with the ‘order’ => ‘ASC’ declaration in the WP_Query arguments. $loop = new WP_Query( array( ‘post_type’ => ‘product’, ‘meta_key’ => ‘product_price’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, ‘posts_per_page’ => 4, ‘paged’ => $paged) ); If we want to pass a url parameter to that we could use something like: … Read more

Insert “javascript:void(0);” into URL

I also can’t stand the fact the WordPress removes “javascript:void(0);” from my hrefs (or anything else TBH…) upon saving or using the visual editor. I just started using the Raw HTML plugin that does the job. I enclosed my code in [raw] … [/raw] codes, and did NOT use the visual editor. My “voids” remain … Read more

Old URL Redirect website after migration

Why not use htaccess on the old place to redirect to the new place? And make sure that the new place has SSL (another htaccess directive). Much googles/bings/ducks on how to use htaccess to redirect from old domain to new one.

What is an arbitrary URL?

Arbitrary by definition is: Based on random choice or personal whim, rather than any reason or system. WordPress sometimes generates URLs automatically and systemically. For example, whenever you create a new WordPress page it will, by default simply generate a URL based on the slug of the page title. example.com/my-page-title/ We can change this but … Read more

Changed permalink structure. Need help with redirecting old posts

…it redirected the old URLs to the new URLs without the end trailing slash and then redirected again with the trailing slash. So, it generated 2 redirects instead of one. RedirectMatch 301 ^/([^/]+)/([0-9]{4})/([0-9]{2})/([^/]+)/$ https://www.example.com/$4 In that case you should simply be able to append a trailing slash to the target URL in the above directive … Read more

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