Edit / Change Jetpack Mobile Theme [closed]

I see 3 ways to edit Jetpack Mobile theme: 1. Use Jetpack’s Custom CSS module Jetpack includes a module named “Custom CSS” that allows you to add your own custom CSS without having to edit your theme stylesheet. The custom CSS editor (under Appearance > Edit CSS) also includes an option to include this custom … Read more

How to connect rating to individual comments?

This is almost entirely an HTML and/or Javascript question. You just need to make proper forms and have some PHP to process it. function additional_fields ($below) { global $comment; $ratsec=”<form action=””.get_permalink().'” method=”get” class=”comment-form-rating”>’; $ratsec .= ‘<input type=”hidden” name=”p” value=”‘.get_the_ID().'”‘; $ratsec .= ‘<label for=”rating”>’. __(‘Rating’) . ‘<span class=”required”>*</span></label>’; $ratsec .= ‘<span class=”commentratingbox”>’; //Current rating scale is … Read more

How to create Admin Notice from Plugin with argument? [duplicate]

This would be an good use PHP 5.3+ anonymous functions. Closure example: <?php function Twit_the_url( $post_ID ) { //connect to twitter api //send tweet with url //get twitter response //send response to admin notice : add_action(‘admin_notices’, function() use ($httpstatus) { echo ‘<div class=”error”><p>’, esc_html($httpstatus), ‘</p></div>’; }); return $post_ID; } add_action( ‘publish_post’, ‘Twit_the_url’); Alternatively, you could … Read more

Taxonomy Drill-Down / Plugin Help – hierarchical queries within plugin?

I had done some work for my upcoming theme which shows category tree (Taxonomy drill down) from custom taxonomy. You can show it on taxonomy page or on category page. if(! defined(‘TH_TAX_TYPE’)) define(‘TH_TAX_TYPE’,’your-tax-type’); function is_decendent($term_id,$main_parent) { $terms= get_term_by(‘id’, $term_id,TH_TAX_TYPE); $parent_term= get_term_by(‘id’, $terms->parent,TH_TAX_TYPE); $grand_parent_term= get_term_by(‘id’,$parent_term->parent,TH_TAX_TYPE); if($terms || $grand_parent_term){ if($grand_parent_term->term_id==$main_parent){ return TRUE; } } return FALSE; } … Read more

How can I apply a WP filter on specific plugin version

Maybe you are looking for the plugin_row_meta filter, where you could add a custom filter like this one: add_filter(‘plugin_row_meta’, ‘custom_plugin_row_meta’, 10, 4 ); function custom_plugin_row_meta($meta, $file, $data, $status) { // // do some filtering on the version text of the Akismet plugin // if( $file === ‘akismet/akismet.php’ ) // $meta[0] = “Version 3.14159265359”; // BAD … Read more

How can I exclude a dynamic URL to show a popup created using ‘WordPress Popup’ plugin

Within the javascript file the developer calls a method when the page loads. jQuery(window).load(po_selectiveLoad); This methods calls another method. function po_selectiveLoad() { po_load_popover(); } If you replace it with this function po_selectiveLoad() { var urlString = new String(window.location.href); if (!urlString.match(/\/cart\//)) { po_load_popover(); } } Of course this is not good because you will need to … Read more

Infinite scroll messing up nth:of-type

You’ve got to take the type in :nth-of-type() literally. It only takes into account the type of the element (in this case DIV). The selector doesn’t matter. :nth-of-type() works the same, except that it only considers element of the given type. http://quirksmode.org/css/selectors/nthchild.html Unfortunately I can’t imagine there is a nice solution for the moment. Maybe … Read more