Cannot access a file in the theme (twentynineteen-child) folder

Could you post your code… its better way to help you. So, I guess you have html form ? An idea : Don’t specify any path on your form and let manage it into your functions.php add_action(‘init’, ‘my_form_process’); function my_form_process(){ // Do nonce check, Post check… } Have look for Nonce security check : Nonce … Read more

Woocommerce: block user removing cart item

Maybe there is a way of doing this, but briefly scanning through the relevant functions suggests that I basically have no control over the item being removed, or the call to wc_add_notice to mark is as removed. As such I ended up with the following fairly simple, but slightly ugly method: add_action(‘woocommerce_cart_item_removed’, function($key, $cart){ // … Read more

What does this shortcode do?

In all honesty, it doesn’t do very much. If the code is literally as you describe, all it does is add fullstops either side of the content. If that’s not what happens then there’s likely missing code. As for the other parts: What is extract? extract is a PHP function used in a lot of … Read more

Trying to chance my link style

This is done with CSS. You must use “border-bottom” property instead of “text-decoration: underline;” so you can have more flexibility with the line. a { text-decoration: none; /* remove the default underline; */ border-bottom: 1px solid blue; /* Set the border width and color. */ padding-bottom: 3px; /* Set the distance between the word and … Read more

WordPress shortcode plugin not working

You can avoid to declare that player is a dependency for your javascript file, the problem is that Jquery isn’t recognized. Change this line: wp_enqueue_script( ‘main’, plugins_url( ‘/main.js’ , __FILE__ ),array(“jquery”,”player”),’0.0.3′,true); into this: wp_enqueue_script( ‘main’, plugins_url( ‘/main.js’ , __FILE__ ), [“jquery”] ); Also avoid to enqueue your script in the footer.

How to show only part of product name in category page – WordPress with woocomerce

I solved this problem with: function hide_product_title_part( $title, $id ) { if ( ( is_front_page() || is_shop() || is_product_tag() || is_product_category() ) && get_post_type( $id ) === ‘product’ ) { if (strstr($title, “:”)) { $new_title = explode(“:”, $title); return $new_title[1]; } else { return $title; } } else { return $title; } } add_filter( ‘the_title’, … Read more

Site load time increased

It may be that the WP database is a bit ‘cluttered’ with draft posts and other things. I’d recommend an optimizing plugin to optimize the WP database. But it also depends on your traffic. Maybe the amount of traffic indicates a need to upgrade your hosting plan from a shared server to the next level.