sacconi
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: new link in admin dashboard opening a predefined emailThis would be my final work: https://pastebin.com/Fuj9wMyt , I have doubts about “get the ID” and “get the user”
Forum: Developing with WordPress
In reply to: new search field in adminSo I just replace “pre_get_posts” with “pre_get_users” ?
Forum: Developing with WordPress
In reply to: new link in admin dashboard opening a predefined emailEverything is working fine! Now I have to refine the content of the body. First of all I would like the content of a specific field that will be found in the edit author page to be inserted in the body, as each author (agency) that receives an email may need a specific message (for some agencies the message will be in Italian, for others in English). And then the code and name of the product for which I am sending the request must appear in a certain point (both of them have a meta custom field), this is the typical message:
Dear Alan
I got the following request:
customer’s name:
number of people:
period:
animals:
apt: HR-LUS-00114 Anja 3thank you
with best regards
Axxxxx Sxxxxxxxx
tel:xxxxxxxxxxxxxxxxx
fax:xxxxxxxxxxxxxxxx
https://www.sacconicase.itForum: Developing with WordPress
In reply to: button for resetting all the custom meta fieldsI have some problems. I created a .js file: “cancella_prezzi_2.js” for your step 1: I added at the end of your code:
add_action( 'admin_enqueue_scripts', 'reset_price_fields' );
is it correct? then I put the file into wp-admin/js , I’m doing correctly? I also did step 2 and step 3, changing the meta fields names (to clear), but at the moment nothing happens when clicking on the button…(I see the button in my author edit page)…
Forum: Developing with WordPress
In reply to: new link in admin dashboard opening a predefined emaillike this? https://pastebin.com/hW0uaArP
Forum: Developing with WordPress
In reply to: Adding a variable to some PHP code with gettextOk, it works but with
esc_html( sprintf( __('Rates %s in €/ week:','mysite-plugin'), $current_year ) );
And I forgot to declare the variable too ??
Forum: Developing with WordPress
In reply to: Adding a variable to some PHP code with gettextBy the way, I have a custom meta field called
current_year
Forum: Developing with WordPress
In reply to: new link in admin dashboard opening a predefined emailI sterted with https://pastebin.com/XfTsKMH0 but this code alone breacks the site, probably because $recipient is not defined (or there are other errors?) The recipient should be taken from https://sacconicase.com/wp-admin/user-edit.php?user_id=5&wp_http_referer=%2Fwp-admin%2Fusers.php%3Frole%3Dauthor
the field in which I find the recipient is among the default fields of the contact information section, it’s the email address of the “author”/ agency
Forum: Developing with WordPress
In reply to: button for resetting all the custom meta fieldsThanks for your effort, When you say “Add the following JavaScript to your admin area”, do you mean that I have to put the .js file in the wp-admin folder? Or do I put it in the “.js” folder inside my theme? In this same “.js” folder is currently the file “areyousure.js” that controls the pop up with the warning message
Forum: Developing with WordPress
In reply to: Adding a variable to some PHP code with gettextDo you have any suggestion? thank you
Forum: Developing with WordPress
In reply to: hiding my visits from google analyticsok, I put the code in header.php just before the tag
</head>
Forum: Developing with WordPress
In reply to: button for resetting all the custom meta fieldsI dont have any plug-in, it’s all coding
Forum: Developing with WordPress
In reply to: hiding my visits from google analyticsthis is my header.php, I have to put the code into the head section top of the page? https://pastebin.com/Ek63Wspe
Forum: Developing with WordPress
In reply to: new link in admin dashboard opening a predefined emailTo tell the truth my currect website has a 2 steps solution: when I click on the link I open the precompiled email and then I have to click to “send” as for anyelse email. A good start would be creating a link that opens the email box with the right recipient, that is to say the agency (author) connected with the apartment (post). In each agency/ author editpage I have a specific field for the email address
Forum: Developing with WordPress
In reply to: Adding a variable to some PHP code with gettextI tryed to use $year instead of $current_year but it’s the same problem. Pls note that the
get_the_author_meta()
is in a file included in functions, instead the $titolo_display_price is in a custom plugin. No, I dont need to display the current year.