responsive.css in the WordPress should be prioritized

If you want to make sure the second stylesheet loads after the first, you can use the third argument of wp_enqueue_style to set a dependency, eg: wp_enqueue_style( ‘styles’, THEMEROOT . ‘/css/style.css’, array() ); wp_enqueue_style( ‘responsive’, THEMEROOT . ‘/css/responsive.css’, array(‘styles’) ); As for having all the styles in responsive.css override style.css, that is going to entirely … Read more

How to create an option page for this simple plugin

Copy pate this below code in your functions.php file, <?php add_menu_page(‘BAW Plugin Settings’, ‘BAW Settings’, ‘administrator’, __FILE__, ‘baw_settings_page’, get_stylesheet_directory_uri(‘stylesheet_directory’).”/images/media-button-other.gif”); ?> <?php // create custom plugin settings menu add_action(‘admin_menu’, ‘baw_create_menu’); function baw_create_menu() { //create new top-level menu add_menu_page(‘BAW Plugin Settings’, ‘BAW Settings’, ‘administrator’, __FILE__, ‘baw_settings_page’,plugins_url(‘/images/icon.png’, __FILE__)); //call register settings function add_action( ‘admin_init’, ‘register_mysettings’ ); } function … Read more

WordPress Page Restrict

You can check for if a user is logged in or not by is_user_logged_in() if logged in then show the page if not then redirect them. Perfect hook to use for this template_redirect. Example function check_and_redirect(){ if( is_page( 45 ) && !is_user_logged_in() ) { wp_redirect( wp_login_url() ); exit(); } } add_action(‘template_redirect’, ‘check_and_redirect’); is_page() is used … Read more

Add tag parameter to category.php

This is an old plugin, but I think you will get idea from this plugin Similar thing is possible with this plugin, you will find more details in plugin description. Alternatively you can use “pre_get_posts” action in your theme’s functions.php file to call only on category archive page using below code. Below code will add … Read more

How do you Permanently Delete Sidebars

Thanks for the comment @Rarst! That was the issue. For whatever reason I had that extra sidebar method call in there and that was causing the problem. register_sidebar( array( ‘name’ => ‘Sidebar’ ) ); register_sidebar( array( ‘name’ => ‘Sub Menu’ ) ); WordPress saves the data from the widgets in the DB but it doesn’t … Read more

Custom gallery in wp3.5

I guess you were sorta correct, @david.binda, lol! After a lot of reading, and experimenting, I added the code below to the else statement in my functions file, and it appears to be working as it did before, although the process seems a lot “bulkier” with the new gallery trying to do it’s thing. $post_content … Read more