WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] cant get anything to display (12 posts)

  1. hasselboxster
    Member
    Posted 1 year ago #

    i've installed the plugin and cant get anything to display with either the shortcode or widget. i've tried deactivating all other plugins, checking site privacy settings, checking the site feed(s) and a few other things including trying to manipulate the settings.

    nothing displays!

    im sure it's something "simple".

    thanks for any input.

    http://wordpress.org/extend/plugins/network-latest-posts/

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello hasselboxster,

    How many sites have you set in your network? Sometimes people has experienced the same behavior when there's only the root site, creating another one fixes this issue.

    If for some reason you are trying network latest posts on a single WordPress installation, it won't work, for single WordPress installations there is Single Latest Posts Lite and Single Latest Posts.

    Let me know if you could solve your issue.

    Cheers.

  3. hasselboxster
    Member
    Posted 1 year ago #

    I have several sites, and definitely is a multisite/network installation. How does it pull the posts from feed/url or direct sql, or something else?

    Its an odd issue im sure - might not be directly related to your plugin as i've had issues with others working too.

    Is there any type of security or other setting that would make them not show up?

    Thanks.

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    No Network Latest Posts doesn't require anything special, this is the way it looks for blogs:

    $blogs = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs WHERE
    public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' $display $ignore AND last_updated >= DATE_SUB(CURRENT_DATE(), INTERVAL $time_frame DAY) ORDER BY last_updated DESC");

    It pulls blog IDs from the blog_id table only for blogs publicly available (public = true). You could try doing a quick sql query to your database and see if it returns something:

    // xx refers to your WordPress prefix, which is wp by default wp_blogs in this case
    SELECT blog_id FROM xx_blogs WHERE public = '1';

    Other thing you could check is your network configuration file, make sure your wp-config.php file contains:

    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/your_website/';
    define('DOMAIN_CURRENT_SITE', 'yourdomain');
    define('PATH_CURRENT_SITE', '/your_website/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    and your .htaccess something like:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /your_website/
    RewriteRule ^index\.php$ - [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>

    If other plugins have failed maybe there's something wrong with your WordPress Network configuration, you can check the codex Create A Network for more details.

    Keep me posted on your progress,

    Best regards.

  5. hasselboxster
    Member
    Posted 1 year ago #

    that is the problem - my blogs are "private":
    public = '-1'

    is this something i could change in the code and not adversely effect the functioning?

  6. hasselboxster
    Member
    Posted 1 year ago #

    i edited the code with a -1, and now it seems to work. downside is that i'd have to edit this with new releases.

    thanks for the boost!

  7. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Well you've found the issue. I will add a new parameter to allow users to query posts from blogs with different visibility settings.

    That way you won't need to hack the code when new releases are published.

    Thanks for your feedback!

  8. Njualem
    Member
    Posted 1 year ago #

    Hi Jose,

    I have this same problem. Few weeks ago, I messed up with my database and all my blogs disappeared leaving only the main blog. I have finally restored my blogs from an old Backup. I updated my plugins including "Network Latest Post" to the latest version, I updated my wordpress multisite to the latest version 3.4.2, but "Network Latest Post" is still not displaying anything at all both short code and widget.

    I have also followed the instructions you gave above. An SQL query returned a table listing all my 5 blogs, all showing "public = 1", my wp-config.php file looks OK except for

    define('SUBDOMAIN_INSTALL', true);

    and my .htaccess file looks OK too.

    I noticed something strange, when constructing the short code from the edit page pop-up window, the options "Display Blog(s)" and "Ignore Blog(s)" doesn't list out my Blog IDs (Note:I have 5 Blogs), it gives only the defaults i.e "Display All" and "Nothing to Ignore". The same case with the widget setting. It seems as if the plugin NLP is not dictating my blogs on the network.

    Any ideas will help.

    Thanks.

  9. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Njualem,

    Please set:

    define('WP_DEBUG', true);

    Let's see if there is something wrong.

  10. Nio
    Member
    Posted 1 year ago #

    Same here.
    "Display Blog(s)" and "Ignore Blog(s)" doesn't list any other blogs, except my Root Site (ID 1)

  11. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Nio,

    Did the problem persist? Is your WordPress network correctly configured?

  12. Nio
    Member
    Posted 1 year ago #

    Hello Jose,

    I created a new test blog (ID14) and it appear along with the first blog (ID1) in the list.
    The other blogs in the network were created before I updated to WP 3.5.

    I checked the blogs attributes (in /wp-admin/network/site-info.php?id=2) and the first option "Public" were checked, but the input was disabled (can't be unchecked)

    With "Inspect Element feature in Google Chrome" I get this:
    <input type="checkbox" name="blog[public]" value="1" checked="checked" disabled="disabled">

    Then I check the table wp_blogs and the blogs (except the new created with ID14) had the "public" field value of "2". I changed all to "1" and it starts showing them in the list.

    Strange thing is that the new created blog doesn't appear in the list of the WordPress menu under "My Sites", but that's another problem, not related to your plugin.

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.