810311
Forum Replies Created
-
I added custom menu, however, it still adds new page to Primary menu
Hi Michael, thanks for responding. May be I should expand more on what I am trying to do.
I have custom coded archive.php in my child theme which I want to use to output yearly archives. In my single.php I added<?php the_category(', ');?>
and<?php the_tags(', ');?>
as links so when the user clicks on them she/he is taken to category or tags archive respectively. However, when I tried to useget_post_type_archive_link
to link to archive.php it takes me to index.php. So I ended up trying to use navigation widget to add there only one page ‘archives’.Forum: Themes and Templates
In reply to: [Twenty Sixteen] social media icons not showing in twentysixteenstill trying to resolve this
Yes. Thanks for responding to me too @jarretc
Hi @jarretc
Yes, I had the script in the footer, however, I removed it now. I got some help on the other forum
Following is the code that worked for me
`{wp_enqueue_script (‘menu-responsive’, get_stylesheet_directory_uri() . ‘/js/menu.js’,
‘0.4.2’, [], true);}’after I added $in_footer parameter. The only thing in the above code I was not able to find explanation for is square brackets parameter? Do you know what are they used for?
“Additionally, where are you getting the /js/menu.js location from initially? That file does not exist in the default list of files in that directory”
menu.js is a custom JS that I added in js folder in my child theme
thanks for the quick response @jarretc
<?php function unhook_parent_style_and_script () { wp_dequeue_style( 'twentysixteen-style' ); wp_dequeue_style( 'twentysixteen-fonts' ); wp_dequeue_style( 'twentysixteen-block-style' ); wp_dequeue_style( 'wp-block-library' ); wp_dequeue_style( 'wp-block-library-theme' ); wp_dequeue_style( 'genericons' ); wp_dequeue_style( 'twentysixteen-ie' ); wp_dequeue_style( 'twentysixteen-ie8' ); wp_dequeue_style( 'twentysixteen-ie7' ); wp_dequeue_script('twentysixteen-script'); wp_dequeue_script('twentysixteen-html5'); wp_dequeue_script('twentysixteen-skip-link-focus-fix'); } add_action( 'wp_enqueue_scripts', 'unhook_parent_style_and_script', 20 ); // remove WordPress emoji code in your pages head without plugin - https://www.denisbouquet.com/remove-wordpress-emoji-code/ remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('wp_print_styles', 'print_emoji_styles'); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'admin_print_styles', 'print_emoji_styles' ); function register_style () { wp_enqueue_script ('menu-responsive', get_stylesheet_directory_uri() . '/js/menu.js');} { wp_enqueue_style ('child-style', get_stylesheet_directory_uri() . '/css/child-style.css');} { wp_enqueue_style ('font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');} add_action('wp_enqueue_scripts', 'register_style');
the script works if I put it in in the footer.php of a child theme, however, its not working from /js/menu.js in child theme
the script works if I put it in in the footer.php of a child theme, however, its not working from /js/menu.js in child theme
am trying to convert this site https://buildandtest.atspace.cc/ into twentysixteen child theme. It appears that /js/menu.js in my child theme is not working as nothing happens when the ham icon button is clicked (pls.see my site link above to check correct behavior). On inspecting via Google Chrome Inspect I am getting the following errors:
Uncaught TypeError: Cannot read property ‘classList’ of null at mediaqueryresponse (menu.js?ver=5.3.2:19) at menu.js?ver=5.3.2:10 at menu.js?ver=5.3.2:31 mediaqueryresponse @ menu.js?ver=5.3.2:19 (anonymous) @ menu.js?ver=5.3.2:10 (anonymous) @ menu.js?ver=5.3.2:31
Any advice is appreciated
The above code did work when I used with a theme created from scratch, however, its not working with child theme.
Forum: Themes and Templates
In reply to: [Twenty Sixteen] social media icons not showing in twentysixteenHi Jarret, no I was not able to get those icons working in my child theme. Can you recommend the best route to have them implemented in my twentysixteen child theme?
Thank youForum: Fixing WordPress
In reply to: social media icons not showing in twentysixteenthanks @t-p i posted in twentysixteen forum
Forum: Fixing WordPress
In reply to: social media icons not showing in twentysixteeni am using child theme for twentysixteen where i am trying to implement this
Forum: Localhost Installs
In reply to: wordpress – localhost error 403 when accessing link in single.phpwhich one you would recommend?