Am I using the flush_rewrite_rules function in the right place?

Considering WordPress Codex flush_rewrite_rules This function is useful when used with custom post types as it allows for automatic flushing of the WordPress rewrite rules (usually needs to be done manually for new custom post types). However, this is an expensive operation so it should only be used when absolutely necessary.… I’d recommend you to … 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);

How do you use WP slugs for PDF files / media?

In my opinion it is best to add an endpoint of the form mysite.com/pdf/<id> or something similar to your like. That way you avoiding attaching the attachments to posts/pages or create a page for each pdf file with is redundant imo for your needs. This is a very small and basic guide. You can modify … Read more

Global variable $post returning incorrect object

Why is test-product-magazine, instead of the correct, shop? The global $post object is not a reliable way to determine anything about archive pages because the object will typically be the first post of the main query when outside the loop. Since the main query is for the posts in the archive and not the archive … Read more

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