Hi, would anybody know what the file name must be for adding html code to a child theme. for example, must the file be custom.php or custom.js

function my_scripts_method() { wp_enqueue_script(       'custom-script',       get_stylesheet_directory_uri() . "/js/custom_script.js        array( 'query' ),'',true );           } add_action( 'wp_enqueue_scripts', 'my_custom_script.js' ); 

Ive tried putting this code in functions.php and header.php to call the javascript. doesn’t work

The countdown javascript animation is in a file named custom_script.js in a folder named js, which is in the child theme folder named wpbdemo. The animation also had css and html, but that is working I think, as the countdown template is showing, its just not doing any movement. So, I think its the javascript code not working. The css is in style.css file and the html is in footer.php.

get term id from term name

Hi i am trying to get term id from term name (title ).

 <?php     if ($  _SERVER["REQUEST_METHOD"] == "GET") {         // collect value of input field      $  nameb = $  _GET['fname2'];      $  namea = $  _GET['fname']; }  // $  nameb = Dolce+Gabana ;  // $  namea = Nike+Company;           ?> 

in above code php varibales equal to term name. But how can I get term id from term names. I use custom taxonomy

WooCommerce – Display Product image and name on Orders page

I used the solution here (linked below). It works great. However, it glitches when displaying an order containing a product that has since been deleted. Is there a way to modify the code so that on products that have been deleted it just shows nothing instead of a huge paragraph of gibberish? Just curious!

Original solution was by @meloman : Display order items names in WooCommerce admin orders list

SEO Black Hat and distribution of malware by creating pages on lots of sites targeting the name of my site

My site made with WordPress is under SEO black hat attack. They’re creating many HTML pages using my site name such as following URLs with my site title & descriptions.

  • https://aaa.example111.it/my-site-name.html
  • https://bbb.example22222222.it/my-site-name.html
  • https://ccccc.example333.it/my-site-name.html

If you click the links of Google search results, first it displays ‘checking your browser before accessing’, then redirect to the malware site zvideo-live.com. Please see the attached list (although they are in Japanese).

What’s happening is very similar to ‘Japanese keyword hack’, but the difference is my site has not hacked and they are using another domains for this. (I thoroughly checked my site and Google tools.) Actually, the users don’t have any problems as far as they click my site domain on Google search results but my site and site domain are very new and most of the search results occupy these phishy sites and it’s annoying.

I made a abuse report to Google and OVHcloud, the domain company, but the malicious pages with new domains are being added every day and it’s very hard to keep doing this.

Following are the list of the domains that hackers are using. (As far as I detect.)

acquariobeb.it areaformativaliceomiranda.it brandoleseconsulenza.it byogastudio.it calabriamediterranea.it cmtservicesrl.it computerassistancesas.it domusvenetia.it fabioviglionephotography.it flanweb.it gabriellaricciocoach.it geniusdomus.it gpad.it granfondovalledelnisi.it lamonicaservizi.it macellerialimonenicola.it onmiccatania.it orsiinchianti.it pizzapadellino-slap-torino.it retedinapoli.it ristorantelafollia.it studiobaldin.it teatrokoine.it triede20.it xtecna.it zancleartecontemporanea.it 

enter image description here

Issues with redirecting domain name to another Apache with WordPress

I am currently running into an issue where if someone types in ‘myolddomain.com’, which is redirected to mynewdomain.com, into Google it will bring up the error message about ‘Attackers trying to steal information’. I do understand the concept that you cannot go from HTTPS to HTTPS without having the SSL certificate match the domain that gets redirected, but I was wondering if there was a way to force browsers to view the old domain as HTTP only and not attempt to load it as HTTPS. I know there is a way I just don’t know how to do it in Apache because I have an IIS site that does this and has no issues. I tried several different rewrite rules and disabling WordPress SSL plugins (this was an inherited site) and still have nothing. If more information is needed please let me know. I appreciate your time.