Dani
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Editing Shop page WooCommerceDone! ??
Really appreciate your help. Thanks you!
Forum: Plugins
In reply to: [WooCommerce] Editing Shop page WooCommercePerfect, thanks you!
Forum: Plugins
In reply to: [WooCommerce] Editing Shop page WooCommerceThanks you so much for your answer!
I don’t want to use any plugin, because I’m going to do many other changes.
Now, after some researches, I understood that I need to copy the template and modify it. I need to add a table, new ways to define the different prices and so on.
Could you please, tell me how I can know when I need to update my new page with the changes you could have done in a new version? I mean, after I copy and modify the template, you release a new version. How can I know that you did a modification on the template and I need to add in my new page?
Thanks!!
One question related to this: “You should conditionally call these functions only when “my-page” has been requested. You can get the requested object’s ID with wp_get_queried_object_id() to compare against the ID of “my-page”.”
If I don’t do that, does it mean that even if I have specific js and css files, they are going to be loaded on every page? How can load only on this specific page?
Thanks you so much!
First of all, thanks you so much!
I’m using a child theme and I have these specific files, because of the code I have there, I’m not going to use it on any other page. I’m trying to be efficient.
The way I’m doing it is:
In my page-calendar.php:
function enqueue_calendar_styles() { $theme_directory_uri = get_stylesheet_directory_uri(); wp_register_style('calendar-style', $theme_directory_uri . '/assets_page-calendar/css/page-calendar.css'); wp_enqueue_style('calendar-style'); // Registra y encola el archivo JavaScript wp_register_script('calendar-script', $theme_directory_uri . '/assets_page-calendar/js/page-calendar.js', array('jquery'), null, true); wp_enqueue_script('calendar-script'); } add_action('wp_enqueue_scripts', 'enqueue_calendar_styles');