Dynamically change page title from URL param

You could do something like this in your header.php file (or where ever you are setting your page titles in your templates) <?php if (isset($_GET[‘user’])) : ?> <title>Entries from <?php echo(htmlspecialchars($_GET[‘user’], ENT_QUOTES)) ?></title> <?php else: ?> <title>Normal page title here</title> <?php endif; ?> Without more info on what plugin you are using, or how your … Read more

Best way to give site sub-page it’s own domain?

You are on the right track. Point your add-on domains to WordPress root Create WordPress landing pages Point to landing page using add-on domain Rel=canonical will prevent duplicate indexing penalty All landing page links will automatically point to canonical domain Naturally you will do all your editing from the canonical domain If you run into … Read more

pass user id in slug and get user information

The code seems incomplete. Maybe the problem is simply that you define $id but then try to use $user_id? Also, I think id is a protected variable, so maybe use my_id instead. Try this: www.mysite.com/test?my_id=123 $user_id = $_REQUEST[‘my_id’]; $camp_link = get_site_url().”/campaign-detail/?id=”.$user_id; echo “<p class=”campaign_store_name”><a href=””.$camp_link.””>”.$camp_title.”</a></p>”; $arform_id = Get_ARFORM_ID_using_slug($camp_link);

Check request URL for pattern

how’s the URL structure? Could you paste here? If you’re URL follows this structure: http://example.com/?foo=bar, so you need to get the foo value with this: if ( isset( $_GET[‘foo’] ) ) { $bar_value = $_GET[‘foo’]; // Do whatever you want with $bar_value. } else { // Do something else. } If that doesn’t work, you … Read more

How do I write the link from front-page.php to home.php?

There really should be a simpler way to do it but you kind of need to know that WordPress stores both the Front Page ID and Blog Page ID in the options table. So, to get the URL of the blog you need to use both get_permalink() and get_option() in conjunction. <a href=”https://wordpress.stackexchange.com/questions/270158/<?php echo esc_url( … 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.

Imported thumbnails have incorrect URL

The easiest way is to use the Cache Image plugin, which ‘sideloads’ images in your posts that are from other domains. I’ve had mixed results, mainly because it seems to not work well for thousands of posts and images – if your site is smaller you may have better results.

Setting a url for a page

you can set the permalinks to %postname%, however this would change the permalinks for the whole site; and you can set the individual page permalink, which is normally derived from the page title, when you edit the page. btw: pages don’t have a category base.

Moving a test WP site to live

You can easily update the Site Url in WP, In the general settings of the Admin section (/wp-admin/options-general.php). Be sure the set the correct URL in the ‘WordPress Address (URL)’ and ‘Site Address (URL)’ fields. You may want to check your config file (wp-config.php) too, if you need to switch databases while moving from Test … Read more

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