Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Mindaugas Jakubauskas

    (@meevly)

    Hey @twinpictures once again,

    We have fixed undefined indexes and variables notices all over the plugin. Please inform us if you still encounter any of them. And thanks once again for letting us know!

    Got it, I will inform you once the repository is set 🙂

    Have a great day!

    Plugin Contributor Mindaugas Jakubauskas

    (@meevly)

    Hi @twinpictures

    We are really sorry about the issue. We are going to fix all undefined variables (those you have mentioned and those you have not) this week, as soon as possible. I will update this thread when it happens.

    At the moment there is no public GitHub repository for this plugin but we will update plugin description once we have it!

    Hi @reti,

    Your function doesn’t work because you haven’t called it. To make it work, you must run it, i.e. write hideParent(); at the end of your functions.php file (or wherever you want in the functions.php file).

    Anyway, it’s not a good practice you use. You should always write JavaScript in a separate file and never echo it in random places, because of performance and technical debt (https://en.wikipedia.org/wiki/Technical_debt).

    Your solution could look like this:

    your-theme/assets/js/main.js
    document.querySelector(".post-9053").parentNode.style.display = "none";

    your-theme/functions.php

    
    function custom_prefix_hide_parent() {
        // check if it is home page and the parameter is set.
        if ( is_home() && isset( $_GET['hideParent'] ) ) {
            // the line below "includes" your javascript file into page loading.
            wp_enqueue_script( get_stylesheet_directory_uri() . '/assets/js/main.js', array(), '1.0.0', true );
        }
    }
    
    // this adds your function to admin_enqueue_scripts hook.
    add_action( 'admin_enqueue_scripts', 'custom_prefix_hide_parent' );
    

    Do not forget to replace “custom_prefix” to your desired one. And always use prefixes for functions names to avoid conflicts with other plugins/themes/native functions.

    You could also read more about hooks and their firing sequence here http://rachievee.com/the-wordpress-hooks-firing-sequence/

    Cheers!

    Hi, @ray1161,

    There’s no native functionality to do that. If you are looking for a development approach, you might create a custom post meta box for posts with ability to add/select all e-mail endings that can see the particular post. Then, before displaying a post, add template_redirect hook to check if the current user mail ending is in the allowed list and if it’s not, redirect the user to 404 page.

    Hi, @thunder_god can you provide your webpage link?

    What you are facing is an error on the server side when updating a post. There might be several causes for that. What I would recommend is to:

    1. Disable all plugins and try saving a post, if it works – then enable them one by one to identify the problem maker.

    2. Make sure your SSL certificate hasn’t expired.

    3. Try switching over to a different theme and see if it helps.

    4. Update all themes/plugins you’re using (don’t forget to make a backup before doing that).

    If it still doesn’t help, you should open a network tab under “Inspect” in your browser. and look for an actual response but to do that you might need a developer help.

Viewing 5 replies - 1 through 5 (of 5 total)