Forum Replies Created

Viewing 15 replies - 46 through 60 (of 74 total)
  • Thread Starter gasmas75

    (@gasmas75)

    Hi Ben,
    Thanks for the reply. Is that out-of-the-box or is there an extra addon? Because as far as I saw in Pro’s features, it has a custom grid feature, but you can’t fully customize the way that the posts appear in the grid. Ex. if I hover over a post i want it to flip and reveal the excerpt with a background color.

    Thread Starter gasmas75

    (@gasmas75)

    So, is there a way to enable the swipe gestures? Should I look for a JavaScript solution? Could you advice please?

    Thread Starter gasmas75

    (@gasmas75)

    Both on LG G4 and Galaxy S7. I use the gesture with my finger swiping to the right and the menu doesn’t open (only by tapping the hamburger) and while open swiping to the left doesn’t close it (only by tapping on close menu link).

    Thread Starter gasmas75

    (@gasmas75)

    devwp.techliving.gr *typo

    Thread Starter gasmas75

    (@gasmas75)

    This is the one I’m using, but the swipe gesture control doesn’t work. It’s ok by pressing the burger and close limks but no gesture.
    Please check devwp.techliving.gt (under development)

    Thread Starter gasmas75

    (@gasmas75)

    Hi! Thanks for the quick reply.
    I’m referring to the physical action of swiping the mobile screen to the right and revealing the menu and vise versa.

    Hello again,
    I’ve been using the customized patch you sent me. Until a week ago everything was fine. But the problem re-appeared: Doesn’t show a custom post from the dropdown search and can’t select one.
    Also the posts in the search results didn’t show up in chronological order (newest first)

    Any advice?
    I can provide login credentials if needed.

    Thread Starter gasmas75

    (@gasmas75)

    I already included the link on my previous post, but here it is for convenience:
    Use this function from @radgh:

    /* Storing views of different time periods as meta keys */
    add_action( 'wpp_post_update_views', 'custom_wpp_update_postviews' );
    
    function custom_wpp_update_postviews($postid) {
    	// Accuracy:
    	//   10  = 1 in 10 visits will update view count. (Recommended for high traffic sites.)
    	//   30 = 30% of visits. (Medium traffic websites)
    	//   100 = Every visit. Creates many db write operations every request.
    
    	$accuracy = 50;
    
    	if ( function_exists('wpp_get_views') && (mt_rand(0,100) < $accuracy) ) {
    		// Remove or comment out lines that you won't be using!!
    		update_post_meta( $postid, 'views_total', wpp_get_views( $postid, 'all', false ) );
    		update_post_meta( $postid, 'views_daily',   wpp_get_views( $postid, 'daily', false ) );
    		update_post_meta( $postid, 'views_weekly',  wpp_get_views( $postid, 'weekly', false ) );
    		update_post_meta( $postid, 'views_monthly', wpp_get_views( $postid, 'monthly', false ) );
    	}
    }

    Then in WPBakery’s post grid->Data Settings->Orderby->Meta Value enter the meta-key of your choice (views_xxxx)

    Thread Starter gasmas75

    (@gasmas75)

    I already included the link on my previous post, but here it is for convenience:
    Use this function from @radgh:

    /* Storing views of different time periods as meta keys */
    add_action( 'wpp_post_update_views', 'custom_wpp_update_postviews' );
    
    function custom_wpp_update_postviews($postid) {
    	// Accuracy:
    	//   10  = 1 in 10 visits will update view count. (Recommended for high traffic sites.)
    	//   30 = 30% of visits. (Medium traffic websites)
    	//   100 = Every visit. Creates many db write operations every request.
    
    	$accuracy = 50;
    
    	if ( function_exists('wpp_get_views') && (mt_rand(0,100) < $accuracy) ) {
    		// Remove or comment out lines that you won't be using!!
    		update_post_meta( $postid, 'views_total', wpp_get_views( $postid, 'all', false ) );
    		update_post_meta( $postid, 'views_daily',   wpp_get_views( $postid, 'daily', false ) );
    		update_post_meta( $postid, 'views_weekly',  wpp_get_views( $postid, 'weekly', false ) );
    		update_post_meta( $postid, 'views_monthly', wpp_get_views( $postid, 'monthly', false ) );
    	}
    }

    Then in WPBakery’s post grid->Data Settings->Orderby->Meta Value enter the meta-key of your choice (views_xxxx)

    Thread Starter gasmas75

    (@gasmas75)

    I included the link to the thread, but for convenience this is the function I used in functions.php:

    /* Storing views of different time periods as meta keys */
    add_action( 'wpp_post_update_views', 'custom_wpp_update_postviews' );
    
    function custom_wpp_update_postviews($postid) {
    	// Accuracy:
    	//   10  = 1 in 10 visits will update view count. (Recommended for high traffic sites.)
    	//   30 = 30% of visits. (Medium traffic websites)
    	//   100 = Every visit. Creates many db write operations every request.
    
    	$accuracy = 50;
    
    	if ( function_exists('wpp_get_views') && (mt_rand(0,100) < $accuracy) ) {
    		// Remove or comment out lines that you won't be using!!
    		update_post_meta( $postid, 'views_total', wpp_get_views( $postid, 'all', false ) );
    		update_post_meta( $postid, 'views_daily',   wpp_get_views( $postid, 'daily', false ) );
    		update_post_meta( $postid, 'views_weekly',  wpp_get_views( $postid, 'weekly', false ) );
    		update_post_meta( $postid, 'views_monthly', wpp_get_views( $postid, 'monthly', false ) );
    	}
    }

    Then in WPBakery I used the meta-key of my choice (views_xxx) as custom sorting.
    Just remember as the function’s author (@radgh) mentioned to set $accuracy to 100 for the first clicks.

    Thread Starter gasmas75

    (@gasmas75)

    I sorted out what the issue was… i was typing a query like

    $args = array(
    	'post_type' => 'post',
            'category_name' => '_Featured_3',
    	'order_by' => 'menu_order'
    );
    $query = new WP_Query( $args );

    but instead i should type post_type=post&category_name=_Featured_3&orderby=menu_order

    Now it’s working excellently!!

    Thanks for your efforts!

    • This reply was modified 6 years, 10 months ago by gasmas75.
    Thread Starter gasmas75

    (@gasmas75)

    Thank you for your response @aurovrata. WPBakery gives you the option to have its data source based on a custom query_posts(), but i’m struggling on how i can get this sorted table

    Thread Starter gasmas75

    (@gasmas75)

    Well i found a solution thanks to @radgh thread and custom function.
    Used his function and then used the meta-keys to get the data into WPBakery’s interface.
    @hcabrera I Used your variation i found in the thread to correct the over 1000 views issue.
    *To whoever it may concern –> Don’t forget to set the $accurancy to 100 for a while until you have a decent view count
    Thanks all

    Thread Starter gasmas75

    (@gasmas75)

    Yes, my bad… closing this thread as resolved and starting a new one.

    Thread Starter gasmas75

    (@gasmas75)

    Hey all.. just uploaded the translation. Could someone please assist me on my second part of the original post? –>

    Secondly, I want to use the custom ordered category of my choice with WPBakery Post Grid sorting. Are there any meta values or anything else I could use to utilize this plugin?

Viewing 15 replies - 46 through 60 (of 74 total)