get_the_title($postID) OR get_the_title()?

I would like to know which could be more performant between these two approaches of getting data of a post To use a loop after a WP_Query($aConditions) and use functions like get_the_title() … and all the similar functions without passing any parameters To call get_the_title($postID) with the parameter outside the loop 1 Answer 1 They’re … Read more

Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?

How do I disable this automatic redirect of the name variable so that I can use it on my call booking landing page? I’m setting up a call booking page here: https://www.themcmethod.com/talk/ I want to add the URL parameters “name” and “email” so I can automatically populate the form. Problem is, when I add the … Read more

Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page

I have a specific requirement that my referral link be as simple as possible to type in manually (customer base is very low skilled) while simultaneously referring to an employee number who was responsible for the referral. So, the referral links need to look like: www.domain.com/referral/1555 Where “1555” is the employee ref number who sent … Read more

Open WordPress ‘Add New Post’ admin page with parameters set via $_GET

I want to launch my web browser from an automation tool I use and open WordPress “Add Nwe Post” page in the admin area with specific title and content (it varies everytime, I generate it dynamically on my local machine). I know that I can use http://blog.mysite.com/wp-admin/post-new.php?post_title=sometitle This is fine. However, if I try to … Read more

Trying to use add_action and do_action with parameters

In my themes functions.php I trying to add a function with parameters (as a test if this works, not for the functionality) and it simply doesn’t work. The parameters always arrive empty even if I call do_action with the parameters enqueued as suggested in this codex page. function alter_item ($user, $items, $action) { global $current_user, … Read more

How to create a shortcode with 1 parameter (atts)

I am having trouble getting a shortcode to work with 1 attribute. Here is my shortcode [sme_user-email userID=”2″] Here are my scripts – none of them work. function getUserEmail_func($atts) { extract(shortcode_atts(array(‘userID’ => 1,), $atts)); $user_info = get_userdata($atts); return $user_info->user_email; } add_shortcode(‘sme_user-email’, ‘getUserEmail_func’); . function getUserEmail_func($atts) { $user_info = get_userdata($atts); return $user_info->user_email; } add_shortcode(‘sme_user-email’, ‘getUserEmail_func’); . … Read more

Why “?v=hash” is added to my URLs? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 6 years ago. Improve this question I’m new to wordpress, I set up everything, but there’s something that bothers me: on every single URL or link, there’s … Read more