• Resolved nunomira

    (@nunomira)


    Hi,

    I have scheduled posts and these are appearing as well.
    How to avoid this from happening?

    This is the code I’m using:

    <?php
    if ( function_exists('wpp_get_mostpopular') )
        wpp_get_mostpopular(
            array('limit' => 8,
            'post_type' => 'mitos,raios-x,factos,artigos',
            )
        );
    ?>

    I’ve also tried this, but the same happens:

    <?php
    if ( function_exists('wpp_get_mostpopular') )
        wpp_get_mostpopular(
            array('limit' => 8,
            'post_type' => 'mitos,raios-x,factos,artigos',
            'freshness' => 1,
            'range' => 'all'
            )
        );
    ?>

    Thanks!

    • This topic was modified 3 years, 3 months ago by nunomira.
    • This topic was modified 3 years, 3 months ago by nunomira.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @nunomira,

    I checked and couldn’t reproduce this. The wpp_get_mostpopular() function shouldn’t list scheduled posts at all (see related code) so something else is going on here.

    Questions for you:

    • How can you tell that WPP is listing scheduled posts?
    • Did you change the publish date of the posts?
    • Is Data Caching enabled on your website?
    • This reply was modified 3 years, 3 months ago by Hector Cabrera. Reason: Added link to Data Caching documentation for reference
    Thread Starter nunomira

    (@nunomira)

    Hi @hcabrera , thanks for getting back to me!

    For example, this post:
    https://viralcheck.pt/?post_type=factos&p=2097
    (“Os anticoncepcionais engordam?”)
    Is listed in the “populares column”

    I suspect that the client published the post, than changed its status to “scheduled”.

    Data caching is enabled for WPP only. No other plugins.
    Here’s the debug info:

    Plugin Configuration
    
    Performance Nag: Inactive
    
    Log Limit: No
    
    Log Views From: Everyone
    
    Data Caching: Yes, 1 minute
    
    Data Sampling: No
    
    External object cache: No
    
    WPP_CACHE_VIEWS: No
    
    System Info
    
    PHP version: 7.3.29-1+0~20210701.86+debian9~1.gbp7ad6eb
    
    PHP extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, interbase, intl, json, exif, mongodb, msgpack, mysqli, odbc, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, apc, posix, readline, recode, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, Phar, memcached, ionCube Loader, Zend OPcache
    
    Database version: 10.1.48-MariaDB-1~stretch
    
    InnoDB availability: DEFAULT
    
    WordPress version: 5.8
    
    Multisite: No
    
    Active plugins: Admin Menu Editor 1.9.10, Advanced Custom Fields 5.9.9, Block Lab 1.6.0, Classic Editor 1.6.2, Custom Post Type UI 1.9.2, MalCare Security - Free Malware Scanner, Protection & Security for WordPress 4.63, Password Protected 2.4, Post Type Switcher 3.2.1, Regenerate Thumbnails Advanced 2.4.0, Thumbnail Upscale 1.1, UpdraftPlus - Backup/Restore 1.16.59, WordPress Importer 0.7, WordPress Popular Posts 5.3.6, Yoast Duplicate Post 4.1.2

    Yes, I can see your code is only fetching published posts.

    • This reply was modified 3 years, 3 months ago by nunomira.
    Plugin Author Hector Cabrera

    (@hcabrera)

    For example, this post:
    https://viralcheck.pt/?post_type=factos&p=2097
    (“Os anticoncepcionais engordam?”)
    Is listed in the “populares column”

    I’m not seeing that particular article under “Populares” though.

    Thread Starter nunomira

    (@nunomira)

    That’s the “recentes” column, not “populares”
    ??
    Which is visible by default.
    You need to click “populares”.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Actually, just had another look and I don’t think the problem is being caused by WPP ??

    There’s a bug with your Populares / Recentes tabs: clicking on Populares shows the recent posts DIV, and clicking on Recentes shows the popular posts list. It should be the other way around.

    In reality it’s your recent posts list what’s showing scheduled posts, not the popular posts one.

    • This reply was modified 3 years, 3 months ago by Hector Cabrera. Reason: Added direct link to screen capture
    • This reply was modified 3 years, 3 months ago by Hector Cabrera. Reason: Rephrased first comment for clarity
    Thread Starter nunomira

    (@nunomira)

    Thank you so much!!
    Going to look at it.
    I feel really stupid.
    ??

    Highly appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Scheduled Posts appearing’ is closed to new replies.