Status Plugin Not Working

Hi,

I recently installed the Status plugin. I am using the option "do not place it automatically, I will place it myself" and have embedded it on this page here:

http://www.insidegameofwar.com/community/

However, it is not working. If you try to post an Image or Video it fails.

Also, I am trying to display the posts directly below the Status plugin. If you could help me out with some template code to achieve this that would be much appreciated.

Thanks

  • Predrag Dubajic

    Hey Dan,

    Hope you're doing well today :slight_smile:

    I tried creating template on default WP theme with this code and it worked fine there, it looks like there's a JS error on your site that's preventing popup window to open up.

    This could be caused by your theme itself or perhaps because one of the plugins.
    I would suggest to start by cleaning up the template file itself and leave only Status code in there with required HTML holders for your page layout, that will tell you if additional code from that template is causing it.

    If it still doesn't work try disabling your plugins to see any of those are causing it.

    Also, I am trying to display the posts directly below the Status plugin. If you could help me out with some template code to achieve this that would be much appreciated.

    Status posts will be created as default WP post so you can use WP query to list them on your custom page.
    You can use GenerateWP for help with creating custom query:
    https://generatewp.com/wp_query/

    Best regards,
    Predrag

  • Dimitris

    Hey there Dan,

    hope you're doing good and don't mind chiming in! :slight_smile:

    Another question for you - I don't want all of the Status posts to appear on the home page. Is there a way of stopping this from happening?

    As you can see in official codex page of WP_Query class here
    https://codex.wordpress.org/Class_Reference/WP_Query
    there could be some different approaches here.

    One of those could be the Custom Field Parameters
    https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
    as all posts made via Status plugin have a custom field like:
    'wdqs_type' => 'status'
    :wink:

    On the other hand, you can always use a plugin like Simple Exclude to manually exclude posts from different views.

    But this is most dependent from your needs. So, how do you want to limit these posts from displaying? Is there a pattern that you want to follow? Please advise!

    Warm regards,
    Dimitris

  • Adam Czajczyk

    Hello Dan!

    You should be able to remove that style for all the pages/posts other than the one where status posts are included with some additional code:

    <?php
    function wpmu_status_unload_front_css() {
    	$page_id = 1;
    	if (!is_page($page_id)) {
    		wp_dequeue_style('widget-front.css');
    	}
    }
    add_action('wp_footer', 'wpmu_status_unload_front_css');

    In order to apply it to your site:

    1. Find the ID of the page where these statuses are displayed; if you go to "Pages -> All pages" list in admin area and edit the page, the browser bar will contain an URL that ends with "post.php?post=XXX&action=edit" where XXX is the number. That is the page ID so replace value of 1 in the code above with that number.

    2. Create an empty file with a .php extension (e.g. "unload-status-front-css.php")
    3. Paste that code inside and save it (using a "clean text" editor such as e.g. Notepad++, Sublime or similar)
    4. Upload the file to the "/wp-content/mu-plugins" folder of your site

    If there's no "mu-plugins" folder inside the "wp-content" folder, just create an empty one.

    That should unload the style on each page/post except that specified one.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.