Category: WordPress

  • How to resolve bbPress Japanese URL issue

    How to resolve bbPress Japanese URL issue

    Problems with using Japanese URLs include decreased browser compatibility and negative effects on SEO. The solution is to use Post ID. Then, the URL will not contain Japanese characters, and the uniqueness of the URL will be guaranteed.

    The implementation method is to use the Custom Post Type Permalinks plugin and specify %post_id% in the permalink settings. However, the Custom Post Type Permalinks plugin is old, so use it with caution. If you have any other new plugins, please let me know.

  • How to build your own brand with a blog

    How to build your own brand with a blog

    Building your own brand with a blog is an effective way to establish your identity, connect with your audience, and showcase your expertise. Here’s a step-by-step guide to help you get started:

    (more…)
  • Problems and solutions that occur when “Force WP User Synchronization” is checked in Simple WordPress Membership

    Problems and solutions that occur when “Force WP User Synchronization” is checked in Simple WordPress Membership

    The following error occurred when I turned on the “Force WP User Sync” setting.

    Error! This site has the force WP user login feature enabled in the settings. We could not find a WP user record for the given username: abcdef

    This error is triggered when a member account doesn’t have a corresponding WP user account. So the plugin fails to log the user into the WP User system.

    Contact the site admin and request them to check your username in the WP Users menu to see what happened with the WP user entry of your account.

    The site admin can disable the Force WP User Synchronization feature in the settings to disable this feature and this error will go away.

    You can use the back button of your browser to go back to the site.

    On the other hand, when this setting was removed, when logging in using the Simple WordPress Membership shortcode,

    [swpm_login_form]

    a problem occurred where the login was not recognized and paid articles could not be viewed.

    Solution

    • Disabled Wordfence Login Security plugin
    • Disabled the “image authentication” setting of the Siteguard plugin

    Now, even if “Force WP User Synchronization” is checked, no errors occur and paid articles can be viewed normally. This shows that Simple WordPress Membership members are stored on a separate system from WP users. Therefore, I understand that the setting to sync with WP users in Advanced Settings is important, and that it is necessary to check “Force WP User Sync.”

    Summary

    If you encounter an issue where you are being treated as if you are logged out even though you’re logged in, first check the “Force WP User Sync” settings. Next, it’s a good idea to verify whether there is a conflict between plugins. In my case, the Wordfence Login Security plugin and the Siteguard plugin were involved.

    While plugins are useful, they can sometimes cause unexpected problems by interfering with each other. It is important to create the optimal operating environment while checking detailed settings and compatibility.

  • [WordPress] How to display blogs in tile format in Cocoon theme

    [WordPress] How to display blogs in tile format in Cocoon theme

    There seems to be a way to display blogs in tiles with Cocoon. You can do this by going to Cocoon settings, index tab, and selecting “vertical card” from the card type.

    Cocoon Tile 1024x338 1 1

    If you want the articles to be in the same position, choose a “vertical card,” and if you don’t mind them being misaligned, choose a “tile card.”

  • [Cocoon] How to unlink your profile name

    [Cocoon] How to unlink your profile name

    There is a problem where the name in the profile section of Cocoon articles is turned into a link, and I will show you how to remove it. Add the following CSS to Add CSS and save it.

    .author-box .author-name a {
        text-decoration: none;
        color: #333;
        pointer-events:none;
        cursor:default;
    }
  • [Cocoon] How to hide the author name of an article

    [Cocoon] How to hide the author name of an article

    Go to Cocoon settings, go to the body tab, scroll down, uncheck Show author name, and save.

  • Configuration when using WooCommerce and W3 Total Cache together.

    Configuration when using WooCommerce and W3 Total Cache together.

    If you want to use W3 Total Cache but have installed the WooCommerce plugin, I will introduce settings to prevent customer information from being cached.

    (more…)
  • [Cocoon] Increase site loading speed by lazy loading Adsense

    [Cocoon] Increase site loading speed by lazy loading Adsense

    Today I will show you how to lazy load Adsense to increase site loading speed. First, if you have auto ads turned on, turn them off from the Google Adsense page. After that, go to your own site and paste the following code in the ad code of the ad tab of Cocoon settings, so let’s change that.

    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456"
         crossorigin="anonymous"></script>
    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-1234567890123456"
         data-ad-slot="1234567890"
         data-ad-format="auto"
         data-full-width-responsive="true"></ins>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

    Delete <script> to </script> from at the top of this and make it look like the following.

    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-1234567890123456"
         data-ad-slot="1234567890"
         data-ad-format="auto"
         data-full-width-responsive="true"></ins>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

    Save it.

    Next, go to the access analysis/authentication tab in Cocoon settings, enter the following code in the footer code, and save.

    <script>
    //<![CDATA[
    //lazy load ads
    var lazyloadads = false;
    window.addEventListener("scroll", function() {
        if ((document.documentElement.scrollTop != 0 && lazyloadads === false) || (document.body.scrollTop != 0 && lazyloadads === false)) {
    
            (function() {
                var ad = document.createElement('script');
                ad.type = 'text/javascript';
                ad.async = true;
                ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
                var sc = document.getElementsByTagName('script')[0];
                sc.parentNode.insertBefore(ad, sc);
            })();
    
            lazyloadads = true;
        }
    }, true)
    //]]>
    </script>
  • [Contact Form 7] How to set Recaptcha.js so that it does not load on anything other than the contact page.

    [Contact Form 7] How to set Recaptcha.js so that it does not load on anything other than the contact page.

    I am creating a contact form using Contact Form 7. I use Recaptcha to prevent spam, but because of this, Recaptcha.js always comes up in Pagespeed Insights in “Eliminate render-blocking resources” or in “Reduce unused JavaScript”. Therefore, I researched and implemented a method to prevent Recaptcha.js from loading on pages other than the contact page. Try putting the following code in functions.php.

    function block_recaptcha_badge() {
     if ( !is_page( array( 'contact-me' ) ) ) {
     wp_dequeue_script( 'google-recaptcha' );
     wp_deregister_script( 'google-recaptcha' );
     add_filter( 'wpcf7_load_js', '__return_false' );
     add_filter( 'wpcf7_load_css', '__return_false' );
     }
    }
    add_action( 'wp_print_scripts', 'block_recaptcha_badge' );

    If you have multiple contact form pages, you can increase the array(‘contact-me’ part, like below.

    array( ‘contact-me’, ‘contact-me’, ‘contact-me-3’