Hiding a php element from mobile browsers

This is more of a php question than a WP question, but there’s a great function here that does what you’re looking for. function is_mobile() { // Get the user agent $user_agent = $_SERVER[‘HTTP_USER_AGENT’]; // Create an array of known mobile user agents // This list is from the 21 October 2010 WURFL File. // … Read more

How to edit/delete single row items in a table on my own menu page

WordPress allows you to use a class called wpdb Here is an example of how you would use it function add_to_db() { global $wpdb; $your_table_name = $wpdb->prefix . “wp-LINKS-list-table”; $the_value=”123″; $wpdb->insert( $your_table_name, array(‘column_name’ => $the_value,)); this will insert 123 into the column_name. You can read more here Note: If you are creating a menu page … Read more

Woocommerce Custom CSV export

Ain’t this just a matter of opening the exported CSV with all products on their own row and doing a global search/replace of “carriage returns” for “commas“? This way you get the format in your example… Example: Item Name_01, Item Quantity_01, Item Variation_01, Item Amount_01, Item Total Price_01, Item Name_02, Item Quantity_02, Item Variation_02, Item … Read more

Wrong links in WordPress?

Go to Settings, then General Settings, then enter the correct url for your WordPress Address (URL). Perhaps you need to change your Site Address too. Source: The WordPress Codex: http://codex.wordpress.org/Settings_General_Screen If this isn’t the case, but the category links are bad, edit the category slug. Go to Posts, then Categories, select article and edit the … Read more

Adding a querystring to an image URL when clicking ‘insert into post’?

You need to use the filter image_send_to_editor. add_filter(‘image_send_to_editor’, ‘wpse_62869_img_wrapper’, 20, 8); function wpse_62869_img_wrapper( $html, $id, $caption, $title, $align, $url, $size, $alt ) { return $html; } These are the values of a test insert and you can use them to build your own $html response. html | <a href=”http://wp34.dev/wp-content/uploads/2012/11/escritorio.jpg”><img src=”http://wp34.dev/wp-content/uploads/2012/11/escritorio-224×300.jpg” alt=”Alt text for the image” … Read more

Include a specific post to the query_posts and remove it if it is already in the returned list

Okay so I tried to read your code, and failed, and reformatted it as it’s currently unreadable, and any errors are obscured by this unreadability. I cannot stress the importance of indenting correctly and following a standardised formatting for making your life infinitely easier: <?php $featured_class=”et_cycle”; $tag = ‘ul’; $attr=”class”; if($responsive){ $featured_class=”flexslider” . $featured_auto_class; $tag … Read more