Trouble hiding menu on single page

This should do it: .page-id-17091 div.fixed-header-box { display: none; } I’d generally prefer setting the theme up to not generate the header for that page, though, rather than hiding it after the fact.

wp_trim_words strips dashicons

Your problem is that your filter is trimming all titles to 7 “words”. This includes blog posts, pages, menu item labels, revision names, and even product names, if you have products. You need to adjust your filter to be less aggressive and only target the titles that you need to truncate. For example, the following … Read more

footer does not respect css stylesheet

It’s just css misunderstanding. if you want to select elementname.classname it means you are selecting elements by type of certain class like in fixed example below, but you’ve put a space between footer and .footer and this way rule expects markup like this <footer> <div class=”footer”></div> </footer> This should work. footer.footer { background-color: #3a9dca; } … Read more

wp_enqueue_media is not loading styles

There are some wp-admin styles you need to load. Since I cannot find any way to let wp_enqueue_style() accept url parameters, so I load styles by wp_head hook function here. add_action( ‘wp_head’, ‘load_admin_media_styles’, 10); function load_admin_media_styles(){ // list all style libs the post page of wp-admin loaded, but we may only need to load 2 … Read more

How to filter widget(s) based on a specific category landing page

First idea: You can create custom widget which will inside it’s displaying logic contain your necessary conditionals check to display only necessary or variable content, utilizing is_category() conditional. Check oficiall widget’s docs and tutorial https://developer.wordpress.org/themes/functionality/widgets/ Another idea: You can use filter sidebars_widgets inside which you’ll remove unnecessary widgets out of being rendered based on your … Read more

page template as a custom post type archive page

You can give people an actual Page to edit, and the permalinks you want, by setting up a rewrite when you create the CPT. Note: you will need to replace all instances of ‘mycpt’ with your actual CPT slug. <?php function wpse_360965_register_cpt() { // First unregister this post type so we’re starting from scratch unregister_post_type( … Read more