Koesterandersen
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Enigma] Drop down menuHi
I cannot get it to work properly. I have tried to put in the above code in different ways – with and without jQuery.
I might have made an error with my functions.php file, which content the below code:
<?php
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ );
function enqueue_parent_theme_style() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
wp_enqueue_script(“MyMenu”,”get_template_directory_uri()” . “/menu.js”);
}I am trying to get it work on this website: https://www.tiptoptilbud.dk/
I am just testing. If you try to click on TESTING 22 and GALLERI in the menu, you will see, that nothing happens.
Forum: Themes and Templates
In reply to: [Enigma] Drop down menuHi
I have already a functions.php file in my child theme, where I have managed to enqueue the css with the following code:
<?php
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ );
function enqueue_parent_theme_style() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}Now – what I want, is some similar code. Though it should regard the menu.js file. I simply do not know what to write.
(I have found the code above somewhere at the net and copied into my functions.php – and now I just want to copy and paste some other code, that will enqueue the menu.js file)
Thanks
Forum: Themes and Templates
In reply to: [Enigma] Drop down menuThank you mrtom414.
That gave me an answer of my question, but it also created a new question.
In what way do enqueue the menu.js file. In other words; what do I write in the functions.php file.
Forum: Themes and Templates
In reply to: [Enigma] Menu Link and HoverHi weblizar_support
I am about to do the same thing as described above. I have found the menu.js file and pasted the code into it.
Now I have this question.
Shall I just overwrite the menu.js file in the parent theme or should I put the menu.js file into a child theme.Thanks in beforehand
Forum: Themes and Templates
In reply to: [Hueman] The difference between two almost similar enqueue codesHi bdbrown
Thank you for your answers.
Now when I have messed up in different threads today I might have learned (by accident) how the rules are here in the forum. And with your explanation I can see now, how the forum works. I will try to remember to do it right in the future.
And thank you for the answer about the difference of the two enqueue functions. Now I have peace in my mind when it comes to this function.
Have a nice weekend
And thanks
Forum: Themes and Templates
In reply to: [Hueman] Child theme import – import function versus enqueueThank you for your link.
Forum: Themes and Templates
In reply to: Making a child theme before making a page templateHi
I think it was the answer I was looking for. Today I am going to practise instead of just reading. Then I will see, if I can make it happen the way I want.
Thank you very much for your help so far.
Forum: Themes and Templates
In reply to: Making a child theme before making a page templateHi Jitendra
Thank you for your answer.
I have found the place in the CSS, where the width of 474 px (not 472 as I wrote in first place) is set. If I just change this to 600 px, then all the pages will get that width, I guess. If I still want some pages to be 474 px and a new page template to be 600 px, how shall I then connect the information in the CSS with the new page template.
And another thing. If I make changes in the parent CSS, what will then happen with the new settings, when the theme is updated.
Thank you in beforehand…