Forum Replies Created

Viewing 15 replies - 31 through 45 (of 93 total)
  • Thread Starter stl99

    (@stl99)

    Too bad, it doesn’t seem to work that way then (my host has rather aggressive caching). Would be nice to have it in tabs…

    Anyway – thanks for your support!

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    Yes!

    – no errors so far
    – yes, text widgets and even more advanced widgets from other plugins are displayed fine
    – it seems the part where WPP should execute somehting is empty:

    <div class="widget-wrap">
    <!-- WordPress Popular Posts Plugin v3.3.4 [W] [daily] [views] [custom] [PID] -->
    <div id="tabbed-widget-area-1_wpp-2" class="tabbed-widget-tab widget_wordpress_popular_posts">
    <a href="#tabbed-widget-area-1_wpp-2" class="tabbed-widget-tab-header"><i class="fa fa-line-chart"></i> WPP Widget</a>
    <script type="text/javascript">
    
    					/* jQuery is available, so proceed */
    
    					if ( window.jQuery ) {
    
    						jQuery(document).ready(function($){
    
    							$.get('/wp-admin/admin-ajax.php', {
    
    								action: 'wpp_get_popular',
    
    								id: '2'
    
    							}, function(data){
    
    								$('#wpp-2').append(data);
    
    							});
    
    						});
    
    					} /* jQuery is not defined */
    
    					else {
    
    						if ( window.console && window.console.log ) {
    
    							window.console.log('WordPress Popular Posts: jQuery is not defined!');
    
    						}
    
    					}
    
    </script>
    </div>
    <!-- End WordPress Popular Posts Plugin v3.3.4 -->
    <div id="tabbed-widget-area-1_text-108" class="tabbed-widget-tab widget_text"><a href="#tabbed-widget-area-1_text-108" class="tabbed-widget-tab-header"><i class="fa fa-comments"></i>Text Widget</a><div class="textwidget"><span style="color:#fff">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</span></div>
    </div></div>
    Thread Starter stl99

    (@stl99)

    <?php
    
    /* Register tabbed widget areas */
    
    function _tabbed_widget_register_sidebars() {
    
    	$tabbed_widget_theme_support = get_theme_support( 'tabbed-widget' );
    	$tabbed_widget_areas = $tabbed_widget_theme_support[0];
    
    	foreach( $tabbed_widget_areas as $widget_area_id => $widget_area_name ) {
    		register_sidebar( array(
    			'id'   => $widget_area_id,
    			'name' => $widget_area_name
    		) );
    	}
    
    }
    add_action( 'widgets_init', '_tabbed_widget_register_sidebars' );
    
    /* Register tabbed widget scripts */
    
    function _tabbed_widget_register_scripts() {
    
    	wp_register_script( 'tabbed-widget', _CORE_PLUGIN_URL . '/js/tabbed-widget.js', array( 'jquery' ), null, true );
    
    }
    add_action( 'wp_enqueue_scripts', '_tabbed_widget_register_scripts' );
    
    /* Tabbed widget class */
    
    class _tabbed_widget extends WP_Widget {
    
    	function _tabbed_widget() {
    		parent::WP_Widget( false, __( ' Tabbed Widget' ) );
    	}
    
    	function widget( $widget_area_args, $instance ) {
    
    		$widget_area_id = $instance['widget_area_id'];
    		if ( empty( $widget_area_id ) OR ! is_active_sidebar( $widget_area_id ) ) {
    			return;
    		}
    
    		wp_enqueue_script( 'tabbed-widget' );
    
    		echo $widget_area_args['before_widget'];
    
    		add_filter( 'dynamic_sidebar_params', array( &$this, 'dynamic_sidebar_params' ) );
    		dynamic_sidebar( $widget_area_id );
    		remove_filter( 'dynamic_sidebar_params', array( &$this, 'dynamic_sidebar_params' ) );
    
    		echo $widget_area_args['after_widget'];
    
    	}
    
    	function update( $new_instance, $old_instance ) {
    		return array(
    			'widget_area_id' => strip_tags( $new_instance['widget_area_id'] )
    		);
    	}
    
    	function form( $instance ) {
    
    		$current_widget_area_id = isset( $instance['widget_area_id'] ) ? $instance['widget_area_id'] : '';
    
    		$tabbed_widget_theme_support = get_theme_support( 'tabbed-widget' );
    		$tabbed_widget_areas = $tabbed_widget_theme_support[0];
    
    		$select_items = '<option value=""></option>';
    		foreach( $tabbed_widget_areas as $widget_area_id => $widget_area_name ) {
    			$select_items .= sprintf( '<option value="%1$s"%2$s>%3$s</option>',
    				$widget_area_id,
    				selected( $widget_area_id, $current_widget_area_id, false ),
    				$widget_area_name
    			);
    		}
    
    		printf( '<p><label for="%1$s">%2$s:</label> <select id="%1$s" name="%3$s">%4$s</select></p>',
    			$this->get_field_id( 'widget_area_id' ),
    			__( 'Widget area', '' ),
    			$this->get_field_name( 'widget_area_id' ),
    			$select_items
    		);
    
    	}
    
    	function dynamic_sidebar_params( $params ) {
    
    		$params[0]['before_widget'] = '<div id="' . $params[0]['id'] . '_' . $params[0]['widget_id'] . '" class="tabbed-widget-tab widget_' . str_replace( '-', '_', sanitize_title( $params[0]['widget_name'] ) ) . '">';
    		$params[0]['after_widget']  = '</div>';
    		$params[0]['before_title']  = '<a href="#' . $params[0]['id'] . '_' . $params[0]['widget_id'] . '" class="tabbed-widget-tab-header">';
    		$params[0]['after_title']   = '</a>';
    
    		return $params;
    
    	}
    
    }
    add_action( 'widgets_init', create_function( '', 'return register_widget( "_tabbed_widget" );' ) );
    Thread Starter stl99

    (@stl99)

    I just disabled the new versions and enabled the old ones (which I tend to keep lately as they made problems before..).

    The last Yoast SEO version that works for me is Version 3.0.7 (premium)

    Thread Starter stl99

    (@stl99)

    For some reason this happens only on one site for us, others work fine with the new plugin versions.

    Using the older versions “fixes” this for now…

    Thread Starter stl99

    (@stl99)

    Hi there,

    It hasn’t happened again so far (I have been using the latest version though), I’ll monitor it and get back to you in case it still happens.

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    Any help or suggestions would be highly appreciated!

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    Thanks for the quick reply!

    Thread Starter stl99

    (@stl99)

    Done – thanks!

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    Thanks!

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    Hi there,

    I’m referring to the sharing buttons at the bottom of the post.

    I have a custom email from name implemented via https://codex.www.ads-software.com/Plugin_API/Filter_Reference/wp_mail_from_name – maybe that’s causing the reply email to be my website’s (from) email (instead of the sender’s email added via the email sharing fields)?

    If so, it would be great if this would be addressed by you guys. As far as I know a lot of people use their own email address as WP from email address..

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    BTW: the function to add a view count to posts for a specific interval looks promising. As stated it’s probably not the ideal solution for high traffic sites. I hoped that you could access the WPP data for that purpose…

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    Hi Hector,

    Thanks! I might keep my current version though as it seems a bit more flexible. Here’s what I use:

    $post_html = '<h3><a class=\'weekly-popular-list\' title=\'{text_title}\' href=\'{url}\'>{text_title}</a></h3>{thumb}{summary} <a href=\'{url}\'>Read more ?</a>';
    
    	ob_start();
    	wpp_get_mostpopular('range=weekly&post_type=post,content,guide,review&freshness=1&limit=20&wpp_start="<div class=\'weekly-popular-posts\'>"&wpp_end="</div>"&post_html="'.$post_html.'"&excerpt_length=80&excerpt_by_words=1&thumbnail_width=740&thumbnail_height=425');
    	$output = ob_get_clean();
    
    	$output = str_replace( 'class="wpp-thumbnail wpp_imgeditor_thumb wpp_featured', 'class="alignleft post-image entry-image', $output );
    
    	$output = $intro_html . "\n" . $output;

    If a post excerpt has a YouTube embed code included it breaks the output for some reason. Also sometimes accidentally added characters do the same as well as changes to the WPP code (e.g. to the image classes).

    Using the regular archives and excerpts would make things a lot easier and reliable, that’s why I hoped there would be a “simple” solution to use WPP to query & sort by a specific time window….

    Cheers,
    Thomas

    Hi there,

    Any news about this? Sounds like a really useful addition to the plugin!

    Cheers,
    Thomas

    Thread Starter stl99

    (@stl99)

    Thanks!

    Cheers,
    Thomas

Viewing 15 replies - 31 through 45 (of 93 total)