How do you create a custom WPTouch theme?

You can write a Child Theme as for any other theme. This way you can extend the functionality override stuff that’s wrapped inside a if ( ! function_exists(‘function_name’) ) statement in the parent themes functions.php override templates There should be no real difference between such themes and normal themes.

Add the current menu item CSS class to a custom page type archive in WordPress menu

This is what you want to do, add_filter( ‘wp_get_nav_menu_items’, ‘cpt_archive_menu_filter’, 10, 3 ); function cpt_archive_menu_filter( $items, $menu, $args ) { foreach ( $items as &$item ) { if ( $item->type != ‘custom’ ) continue; if ( get_query_var( ‘post_type’ ) == ‘your-post-type’ && $item->title == ‘Title of Link’ ) { $item->classes []= ‘class-name-your-want’; } } return … Read more

Vertical Sidebar Menu Parent and Child not displaying correctly [closed]

Add this to your function.php file: function hierarchical_submenu_get_children($post, $current_page) { $menu = null; // Get all immediate children of this page $children = get_pages(‘child_of=” . $post->ID . “&parent=” . $post->ID . “&sort_column=menu_order&sort_order=ASC’); if ($children) { $menu = “\n<ul>\n”; foreach ($children as $child) { // If the child is the viewed page or one of its … Read more

Handling URLs in WordPress application

../directory1/directory2/directory3/css/stylesheet.css should get you there if I am reading your description accurately. However, I would be very cautious using relative links in WordPress. They do not always work the way you’d expect because a lot of ‘directories’ don’t actually exist. They are fabricated by WordPress and mod_rewrite. The two conspire to lie about filesystem structure. … Read more

Theme information in style.css being corrupted

I use Notepad2 to edit style.css I opened it in Notepad++, and there were extra line breaks on every line. I opened it in Dreamweaver CS6, selected Commands > Apply Source Formatting, and all extra line breaks were removed. I uploaded it, and it now views normally in the browser (Originally viewing style.css showed the … Read more

How to make float element in tinymce

You could add custom quick tags (for the text editor) easily as follows function wpse182089_add_float_quicktags() { if (wp_script_is(‘quicktags’)){ ?> <script type=”text/javascript”> QTags.addButton( ‘floatr’, ‘float right’, ‘<span style=”float: right”>’, ‘</span>’, ”, ”, 41 ); QTags.addButton( ‘floatl’, ‘float left’, ‘<span style=”float: left”>’, ‘</span>’, ”, ”, 42 ); </script> <?php } } add_action( ‘admin_print_footer_scripts’, ‘wpse182089_add_float_quicktags’ ); You could … Read more