Widget Logic code for different PMP membership levels
This worked for me: pmpro_hasMembershipLevel(6) Or whatever the level is, 1,2,3,4 etc. Mine was 6.
This worked for me: pmpro_hasMembershipLevel(6) Or whatever the level is, 1,2,3,4 etc. Mine was 6.
You can write the logic inside widget functions. When the widget is added in sidebar, it will check for sidebar name and home page. global $wp_registered_widgets, $wp_registered_sidebars; $sidebars_widgets = get_option(‘sidebars_widgets’); if($sidebars_widgets[“sidebar-1”] && is_home()) { //Write your logic here }
You have a $facebook = $instance[‘youtube’]; instead of $youtube = $instance[‘youtube’];
you would need to create widget areas and new widgets http://codex.wordpress.org/Widgetizing_Themes
The main changes needed in order to use tags instead of categories would be: In section one, change… $args[‘category__in’] = $categories; to $args[‘tag__in’] = $categories; And in the second section, change the cats loop: $title = esc_attr($instance[‘title’]); $number_posts = (int) $instance[‘number_posts’]; $categories = (array) $instance[‘categories’]; echo ‘<p><label for=”‘ . $this->get_field_id(‘title’) . ‘”>’ . ‘Title: ‘ … Read more
How can I build a widget area widget using the built in WordPress functionalities?
I just understood what happened: The custom widgets were using short tags (<?) to split up the HTML output, which directive (short_open_tag) is disabled by default in the production environment. Problems like this are a pain to spot and I can do nothing but laughing thinking what we tried to understand the issue.
This needs to be implemented at the widget code level for which the code in the question you start with is not a good match. The easiest way might be to decouple the widget content editing and the widget placement. You can set up a specific page in which it is possible to manage the … Read more
I think the simpelest solution would be to use the generated RSS-Feeds and integrate them somehow with an RSS Widget Plugin. A plugin search could help you here, I guess.
I’m not the only one with this problem. The simplest way I feel is the site wide readme.html method or the wp-admin/about.php method. This wordpress post has four ways to check and this question on stackoverflow had good info. I looked and looked but couldn’t see it in the At a Glance box until later … Read more