Forum Replies Created

Viewing 15 replies - 1 through 15 (of 380 total)
  • ejm

    (@llizard)

    After updating to WP6.8.2, because of conflicts with older plugins, it was with great reluctance that I disabled the Classic Editor to switch to using the largely WYSIWYG Block editor.

    I do understand that there is a way to use the Classic mode within the Block system. After having to consult too many pages on how to use the blocks, I did that. It is very surprising to see that the Block editor adds extra code if a user is opting to insert HTML rather than use the visual editor.

    WP has made it arguably more difficult to switch from visual to code, also to find , the Block editor still needs work: to easily see the sidebar with its dashboard, to immediately see the discussion options below a post, to see the categories listed without having to search for them, to find the screen elements options, to do exactly what the classic editor did so very well.

    Until there is an obvious way to find the button to disable comments on individual posts, I highly encourage WP to update and support the classic plugin.

    (I had to re-enable Classic Editor to find the “disable discussion” section.)

    Thread Starter ejm

    (@llizard)

    Thank you again for all your help. The error message I’m seeing is “some code in the plugin or theme running too early”.

    (Unfortunately, my server is less than helpful and/or available.) I’ll keep chipping away at it. Alas, it means having to delete some favourite plugins that have only recently become obsolete and are no longer maintained to be compatible with the latest WP update. (That is, “recently” in real time rather than computer time; they were fine until a couple of months ago)

    I will mark this as “resolved”.

    Thank you again.

    – E

    • This reply was modified 8 months ago by ejm.
    Thread Starter ejm

    (@llizard)

    Ooops. I neglected to insert the following just before the “attach webname to author”. I have re-inserted the coding again. It does not throw any errors. But it also does not display the webname if it is filled in.

    // make sure webname appears if it is filled in
    function comment_edit_function( $comment_id )
    {
    if( isset( $_POST['webname'] ) )
    update_comment_meta( $comment_id, 'webname', esc_attr( $_POST['webname'] ) );
    else
    $_POST['webname'] = '';
    }
    Thread Starter ejm

    (@llizard)

    Thank you, threadi. This has been most helpful.

    I have also added the following. These two functions do NOT cause any critical errors (yay!) But also do not appear to be putting anything into the comment editing screen. Nor does the second function attach the webname to the author in the comments section on the blog. But at least the added field is no longer causing any fatal errors!

    /*...............
    Update comment meta data from comment editing screen
    ...................*/
    function webname_comment_edit_meta_fields( $comment_id ) {
    if ( ( isset( $_POST['webname'] ) ) && ( $_POST['webname'] != '' ) ) {
    $webname = wp_filter_nohtml_kses( $_POST['webname'] );
    update_comment_meta( $comment_id, 'webname', $webname );
    }
    }
    add_action( 'edit_comment', 'webname_comment_edit_meta_fields' );

    /*...............
    Attach website name to author
    ...................*/
    add_filter( 'get_comment_author_link', 'attach_websitename_to_author' );
    function attach_websitename_to_author( $author ) {
    $webname = get_comment_meta( get_comment_ID(), 'webname', true );
    if ( isset( $webname ) && '' != $webname ) {
    $author .= esc_html(" ($webname)");
    }
    return $author;
    }

    Any ideas about what I have done wrong in these two functions that did work in php7?

    Thank you again!

    Thread Starter ejm

    (@llizard)

    Thank you for posting a how-to for inserting code. I was going to insert the code but was challenged by the new format here. (I am very challenged with “blocks”.)

    Sigh. Every time I try to insert the code, I click on “code”, paste in the code and hey presto, it strips any instances of < and > away. I’ll try one more time… FINALLY!! I did not realize I had to look for the code block further down in the post. (I am from the previous century when we used to simply surround code with single quotes….)

    Here is the code that is causing the critical error:

    function add_comment_fields($newfield) {
    $newfield['webname'] = '<p class="comment-form-author" title="this field is optional"><label for="webname">' . __( 'Your Site\'s Name' ) . '</label>' .
    '<input id="webname" name="webname" type="text" size="30" /></p>';
    return $newfield;
    }
    add_filter('comment_form_default_fields','add_comment_fields');

    Thank you for any help you can offer.
    – E.

    Thread Starter ejm

    (@llizard)

    Thank you for your reply. I will stare at the error logs.

    Thread Starter ejm

    (@llizard)

    re: “If you really want to start this change I recommend you to join the WordPress slack channel, […snip…] and mention your ticket there.”

    Because I am not a programmer, and considering that there has been little attention from developers interested on implementing this feature in 13 years since someone first placed the ticket, and the sporadic replies offering solutions or stating that this is indeed a good idea (indicating statistically that there must be others wanting this improvement to the WP core), I confess that I’m not sure that I’m ready for the disappointment when/if nothing happens again.

    If there is a mis-threaded comment on my WP again, I will probably just resort to delving into the database as you suggested. Thank you again, !Benni, for pointing to that plugin-free solution.

    • This reply was modified 2 years, 5 months ago by ejm.
    Thread Starter ejm

    (@llizard)

    Thank you, !Benni. I have created a ticket and hope that I filled everything in correctly. Fingers crossed….

    Thread Starter ejm

    (@llizard)

    Thanks for finding that, !Benni. Others may find this plugin useful. (I am not wild about installing a plugin just for this; I don’t get enough comments to make it worthwhile.)

    Going directly into the databasetable did the trick. Still, it would be handier if there were a place in the comments area of WP-admin where this could be done.

    With reluctance, I’ll mark this question as resolved.

    Thread Starter ejm

    (@llizard)

    Thank you, !Benni. I was hoping there was a way from the admin area of wp, but if going into the database itself is the only option, that will have to do.

    I’m going to leave this as “unresolved” just in case someone knows a better way.

    Thread Starter ejm

    (@llizard)

    Thank you for your reply, Jan Dembowski.

    By putting the following in my theme’s functions.php, am I correct that “get header” would cause the page to display my theme’s header?

    // Activate WordPress Maintenance Mode
    function wp_maintenance_mode() {
        if (!current_user_can('edit_themes') || !is_user_logged_in()) {
            wp_die('<h1>Under Maintenance</h1><br />Something ain't right, but we're working on it! Check back later.');
        }
    }
    add_action('get_header', 'wp_maintenance_mode');

    However, this would cause the site to show it was in Maintenance mode until the coding was removed, would it not?

    What I am trying to do is use “The maintenance function in WordPress” but avoid the display of a wp-generated splash page that is largely blank (or worse, if I used a plugin, one with someone else’s generic background image) with just a few words on it and nothing else (even if it is for a very short time) that doesn’t not look anything like the expected view of the site.

    WordPress updates shouldn’t take longer than a minute, but during that minute, your site will be replaced by this splash page [- mhthemes.com/support/knb/how-put-wordpress-in-maintenance-mode/#built-in-maintenance-mode]

    In computer time, a minute is an eon.

    I was hoping that someone might be able to explain how I could make the maintenance page show my header and footer (and perhaps modified sidebar), with the maintenance message displayed prominently on the main part of the page. It doesn’t seem like a huge thing to want….

    Until around December, we were able to do that by customizing the maintenance.php in wp-content folder.

    WP is just one aspect of my site. When WP is in maintenance, I would like to be able to offer visitors links to related parts, rather than knowing they will simply leave in impatience.

    Correct me if I’m wrong, but placing the WP php coding on a div to be inserted on a largely HTML based page would not be any more of a security risk than having the WP-generated php page would it?

    -E. Morris

    P.S. The reason I moved the question over into Feedback section was to point out that there is zero explanation of /wp-content/maintenance/template.phtml in the Codex. Or at least, if there is, it is pretty much impossible to find by searching.

    Thread Starter ejm

    (@llizard)

    Alas, the thread I started in the Feedback section of the forum has been removed. How disappointing.

    Thread Starter ejm

    (@llizard)

    I have now moved this question over to https://wordpress.org/support/topic/walk-through-to-customize-maintenance-page-without-a-plugin/

    I do not know how to close this thread. I am reluctant to mark this as “resolved”, because it is not.

    • This reply was modified 4 years, 8 months ago by ejm.
    Thread Starter ejm

    (@llizard)

    Thank you for your reply, t-p.

    Just to clarify, I am hoping NOT to use a plugin. Already, a number of the maintenance mode plugins are no longer compatible with the latest WP version. Additionally, the plugins that are compatible with the latest WP version offer their own templates or a blank template, offering blocks to modify. (I still haven’t wrapped what’s left of my mind around the block editor.)

    What I’m looking for is something that will use the theme of my WP. I have zero plans to change that theme….

    I will try in the developers’ forum to see if someone there can help.

    Thread Starter ejm

    (@llizard)

    Thank you for your reply, jasonabmw. Yes, the code snippet I used does indeed match our server’s version of Apache. I will do as you say, and until the coding is fixed by the plugin (I cannot find where the directive for it is in the plugin files), I will manually change it.

    I see that this plugin has just been updated, but the .htaccess file remains the same. Takayuki Miyoshi, I trust you will fix the /wp-content/uploads/wpcf7_uploads/.htaccess file coding to provide backward compatibilty as well as forward compatibility in the next update.

    Thank you.

Viewing 15 replies - 1 through 15 (of 380 total)