Translate Woosidebars plugin strings
Try to rename your files, from woosidebars-fr_FR.po to fr_FR.po. The same for .mo file.
Try to rename your files, from woosidebars-fr_FR.po to fr_FR.po. The same for .mo file.
Ok, the problem in my solution was the use of $menu_item->ID instead of $menu_item->object_id. So the full correct logic is like so: function print_sub_menus() { global $post; // get current page $post_id = $post ? $post->ID : -1; $has_post_parent = $post && $post->post_parent; $top = $has_post_parent ? array_pop( get_post_ancestors($post_id) ) : $post_id; // get all … Read more
By means of preg_match and the like you can only write rules for specific devices (in your case the GT-P5100). What you want to do, however, is to affect only your device (meaning: not all Galaxy Tabs). I’d vote for setting a cookie and act upon it’s particular value: setcookie(‘no_mobile_theme_please’, 1, time()+60*60*24*30, “https://wordpress.stackexchange.com/”, $_SERVER[‘SERVER_NAME’], false, … Read more
Thanks for the help. In this case, it looks like it’s an issue with the supercache plugin. When it wasn’t activated, the code isn’t added. When it’s activated, the code is added. Still not sure how or why it was added, but at least It’s not showing up now.
Do you want to list only the pages with children? I’m not sure to understand well what you want to do 🙁 If I’m right, you’ll have to do something like this with get_pages() and generate your listing manually after: // First get all pages $pages = get_pages(); // Then, get page IDs if ($pages) … Read more
You should be able to use the caption from post_excerpt of the WP_Post object. $the_imgs = get_custom_field(‘gallery_img:to_array’); foreach( $the_imgs as $img ) { list( $url, $width, $height ) = wp_get_attachment_image_src( $img, ‘thumbnail’ ); $img_post = get_post( $img ); echo ‘<img src=”‘ . $url . ‘” width=”‘ . $width . ‘” height=”‘ . $height . ‘”> … Read more
I went through all this yesterday! According to the codex there must be a post id given to current_user_can to check ‘edit_post’, so your capability check should be: if( !current_user_can( ‘edit_post’, $post_id ) ) return; Also, your final two lines should be more like this: $chk = isset( $_REQUEST[‘page_title_off’] ) ? ‘on’ : ‘off’; update_post_meta( … Read more
Not entirely sure what you’re asking but you have to include and register scripts and then enqueue what you require like:- <?php wp_enqueue_script(‘jquery’); ?> (Place immediately before <?php wp_head(); ?>). Which is included with WordPress incidentally. You can read more on wp_enqueue_script for more information on how to use this in your theme. Edit An … Read more
You should not do this via CSS as the underlying functionality would still be there (and thus open for direct access). I’d rather rewrite the theme in a way that the menu pages are only added if the current user has a certain capability. if (current_user_can( SOME_CAP )) { add menu pages … } You … Read more
Put the script into an external file, set the selector there and enqueue it from your shortcode: if(! function_exists (‘aisis_toc’) ) { function aisis_toc() { if ( ! is_singular() ) return; wp_enqueue_script( ‘jquery-toc’, plugins_url( ‘js/jquery-toc.js’, __FILE__ ), array ( ‘jquery’ ), NULL, TRUE); return; } }