jQuery accordion menu

Add the menu_class argument with value of cd-accordion-menu to your code, so that it looks like this: <div class=”menu-container”> <nav id=”site-navigation” class=”main-navigation” role=”navigation”> <?php wp_nav_menu(array( ‘theme_location’ => ‘primary’, ‘sort_column’ => ‘menu_order’, ‘menu’ => ‘Categories’, ‘container_class’ => ‘main-menu’, ‘menu_id’ => ‘primary-menu’, ‘menu_class’ => ‘cd-accordion-menu’ ) ); ?> </nav><!– #site-navigation –> </div><!– #menu-container –> You can see … Read more

Dividing the loop to style post differently

You don’t need to alter the code for different formatting, you can simply use the :first-child pseudoclass in css. The foreach loop will, presumably, generate similar blocks of code, structured like this: <div class=”all-my-posts”> <article class=”my-slider-post”> … </article> <article ..> </article> … </div> Now you can simply addres the first <article> block with css like … Read more

Need help removing […] after excerpt

This has to work, Im using it in several projects: add_filter( ‘excerpt_more’, ‘my_excerpt_more’ ); function my_excerpt_more( $more ) { return ”; } Just copy-paste it to your functions.php. Little bonus snippet that you might need: add_filter( ‘excerpt_length’, ‘my_excerpt_length’ ); function my_excerpt_length( $length ) { return 50; } This means that excerpt is 50 words long. … Read more

Website completely messes up when logging out

If you check out the browser’s console, you can see that several stylesheets are not loading. Also, there’s this error: Resource interpreted as Stylesheet but transferred with MIME type text/html: “https://www.counterboosting.com/wp-content/cache/minify/000000/M9BPLCjIz8wryU3NK9EvLqnMSQUA.css“. It appears that you have a plugin installed that does caching/script minification, and something is not configured correctly there. The plugin is probably configured … Read more

change or add css to theme from plugin

I believe you need to add __FILE__ to your plugins_url() function. It may not be calling the right location. It should look like this: add_action( ‘wp_enqueue_scripts’, ‘wpse_238154_register_plugin_styles’ ); function wpse_238154_register_plugin_styles() { wp_enqueue_style( ‘fh-plugin’ , plugins_url( ‘nf-plugin/includes/f-hide.css’, __FILE__ ) ); }