RealSouthpaw
Forum Replies Created
-
Forum: Hacks
In reply to: Custom settings for theme sidebarResolved. Classmate figured out how to do it so settings are now working perfectly. In case that, someone need something similar in future, here is the code we did:
//Settings page for theme is done here function setup_theme_admin_menus() { add_menu_page('Theme Options', 'Theme Options', 'manage_options', 'theme_settings', 'theme_options', '', '58'); add_submenu_page('tut_theme_settings', 'Sidebar', 'Sidebar', 'manage_options', 'theme_settings', 'theme_options'); } // This tells WordPress to call the function named "setup_theme_admin_menus" // when it's time to create the menu pages. add_action("admin_menu", "setup_theme_admin_menus"); //Registers options needed for this theme function register_mysettings() { register_setting( 'themeoption-group', 'chooseright', 'right'); } add_action( 'admin_init', 'register_mysettings' ); //This is the actual settings page for theme function theme_options() { //Checks if hidden field in form is submitted if (isset($_POST["update_settings"])){ //Selects the previous value of the field, to restore it in case an invalid entry has been given $prev = $sidebar_location; $sidebar_location = esc_attr($_POST["sidebarlocation"]); //Verifies if the given value exists in the layouts array if ($sidebar_location == 'right' || $sidebar_location == 'left'){ update_option("sidebar_location", $sidebar_location); } else{ update_option("sidebar_location", $prev); } ?> <div id="message" class="updated"> <p><strong><?php _e('Settings saved.') ?></strong></p> </div> <?php }?> <? $sidebar_location = get_option("sidebar_location"); echo $sidebar_location; ?> <div class="wrap"> <h2>Theme Options</h2> <hr> <form method="post" action=""> <label>Sidebar location:</label><br/> <input type="radio" name="sidebarlocation" value="right" <?php if($sidebar_location == "right"){echo "checked";} else{ }?>>Right<br> <input type="radio" name="sidebarlocation" value="left" <?php if($sidebar_location == "left"){echo "checked";} else{ }?>>Left <input type="hidden" name="update_settings" value="Y" /> <?php submit_button(); ?> </form> </div> <?php } ?>
Forum: Networking WordPress
In reply to: How to delete network connection dashboardSolution found, needed just to take out lines I added wp-config. (First time I tried it the site gave me error but seems like it was something to do with my internet connection.)
Forum: Themes and Templates
In reply to: How to remove inner style from wp_nav_menu?Went through every javascript I have here and found just one line, which lowered the number from 16,5 to 11,5px. After that I went one more time through every file in theme but couldn’t find any line which would cause the inline element at navigation. So solved this with that
!important
and it’s working now.Thanks for the help.
Forum: Themes and Templates
In reply to: How to remove inner style from wp_nav_menu?https://katikoskela.com/www/showreel/
Here is the link.Another strange thing I noticed just now is that inner style shows up just when checking element with firefox own web console thing. When looking the actual source code everything seems to be ok. And yes, I’ve set up my child theme.
Forum: Fixing WordPress
In reply to: Twenty-ten doesn't upload custom headerOh, now I get it. I tried now with another picture instead and with it all worked just fine now. Then I started to look sizes of the files and noticed that the actual logo picture was like 3kb too big ?? So… fixed and thanks for the help <3
Forum: Fixing WordPress
In reply to: Twenty-ten doesn't upload custom headerYes, files are showing up there. The default access just is 666 every time I try to upload something, may this be the problem here? Here too I tried to change it afterwards to 777 and then upload it from media library but still nothing.
Forum: Fixing WordPress
In reply to: Twenty-ten doesn't upload custom headerOkay, tried that. Blank space is still there.