for next loop doesn’t count last line on a textbox

558fe5180e0e8fc922d31c23ef84d240

Like title, more particulary, I have two textbox when user put links when finished the result will be on the second one with some default string in the 0 index of the counter and after the exiting of the loop. My question is how I can make that even the last line will be readed in the for loop? Because I was thinking that the problem will be in the temparray=textbox1.Lines

 tempArray = TextBox1.Lines
        For counter = 0 To tempArray.Length - 1
            If counter = 0 Then
                tempArray(0) = cbname2
            ElseIf counter = 1 Then
                tempArray(1) = "~!" & "img(" & tempArray(counter) & ")"
            ElseIf counter >= 2 Then
                tempArray(counter) = "img(" & tempArray(counter) & ")"
            End If
            TextBox2.Lines = tempArray
        Next
        TextBox2.Text &= vbCrLf & "!~" & " ~~~"
    End Sub

8 Interesting Typography Links for January 2022

Typography Definitions Cover

Every now and then, I find that I’ve accumulated a bunch of links about various things I find interesting. Typography is one of those things! Here’s a list of typography links to other articles that I’ve been saving up and think are worth sharing.

A specimen of the Retail typeface, once of the typography links in the list.
An awesome new font from OH no Type Company

Do you have any interesting typography links from the past month worth sharing? Drop ’em in the comments!


8 Interesting Typography Links for January 2022 originally published on CSS-Tricks. You should get the newsletter and become a supporter.

Adam Argyle’s Sick Mouse-Out CSS Hover Effect

Category Image 091

I was killing some time browsing my CodePen feed for some eye candy and didn’t need to go past the first page before spotting a neat CSS hover effect by Adam Argyle.

I must’ve spent 10 minutes just staring at the demo in awe. There’s something about this that feels so app-like. I think it might be how contextually accurate it is in that the background color slides in from the left, then exits out through the right. It’s exactly the sort of behavior I’d expect from a mouse-in, mouse-out sort of interaction.

Whatever the case, I fired up a fresh pen and went to work recreating it. And it’s not super complex or anything, but rather a clever use of transitions and transforms paired with proper offsets. Quite elegant! I’m actually a little embarrassed how long it took me to realize how the mouse-out part works.

Here’s how I tackled it, warts and all.

“I bet that’s using a transition on a background.”

That was my first thought. Define the background-color, set the background-size and background-position, then transition the background-position. That’s how I’ve seen that “growing” background color thing done in the past. I’ve done that myself on some projects, like this:

If I could do the same thing, only from left-to-right, then all that’s left is the mouse-out, right? Nope. The problem is there’s nothing that can really make the background-position transition from left-to-right to left-to-right. I could make it do one or the other, but not both.

“Maybe it’s a transform instead.”

My next attempt was jump into transforms. The transform property provides a bunch of functions that can transition together for slightly more complex movement. For example, the background can “grow” or “shrink” by changing the element’s scale(). Or, in this case, just along the x-axis with scaleX().

But like I mentioned, there isn’t a way to isolate the element’s background to do that. Going from scaleX(0) to scaleX(1) scales the entire element, so that basically squishes the link — content and all — down to nothing, then stretches it back out to its natural size which is a totally different effect. Plus, it means starting with scaleX(0) which hides the whole dang thing by default making it unusable.

But a pseudo-element could work! It doesn’t matter if that gets squished or hidden because it isn’t part of the actual content. Gotta put the background on that instead and position it directly under the link.

a {
  /* Keeps the pseudo-element contained to the element */
  position: relative;
}

a::before {
  background: #ff9800;
  content: "";
  inset: 0; /* Logical equivalent to physical offsets */
  position: absolute;
  transform: scaleX(0); /* Hide by default */
  z-index: -1; /* Ensures the link is stacked on top */
}

“Now I need ::before to change on hover.”

I knew I could make ::before scale from 0 to 1 by chaining it to the link element’s :hover state.

a:hover::before {
  transform: scaleX(1)
}

Nice! I was onto something.

Sprinkle a little transition fairy dust on it and things start to come to life.

a::before {
  background: #ff9800;
  content: "";
  inset: 0;
  position: absolute;
  transform: scaleX(0);
  transition: transform .5s ease-in-out;
  z-index: -1;
}

“Hmm, the transition moves in both directions.”

Again, this is where I sorta got stuck. Something in my head just wasn’t clicking for some reason. As per usual, I ran over to the CSS-Tricks Almanac to see what property might’ve slipped my mind.

Ah, yes. That would be transform-origin. That allows me to set where the transform starts, which is not totally dissimilar from setting the background-position like I tried earlier. The transform could start from the left instead of its default 50% 50% position.

a::before {
  background: #ff9800;
  content: "";
  inset: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s ease-in-out;
  z-index: -1;
}

Yeah, like this:

I was already transitioning ::before to scaleX(1) on link hover. If I reversed the transform-origin from left to right at the same time, then mayyyybe the highlight goes out the opposite of how it came in when the mouse exits?

a:hover::before {
  transform: scaleX(1);
  transform-origin: right;
}

🤞

Whoops, backwards! Let’s swap the left and right values. 🙃

Gorgeous. Thank you, Adam, for the inspiration!


Adam Argyle’s Sick Mouse-Out CSS Hover Effect originally published on CSS-Tricks. You should get the newsletter and become a supporter.

sub of a event handler (dynamically generated, combobox, textbox, button)

558fe5180e0e8fc922d31c23ef84d240

Hi all, I have created an Event handler to a function for clicking a generated button, now when this button is clicked need to paste in a textbox the Combobox.seleteditem (that it's a string. Each generated one (Combobox, textbox, button) will have a selected index of the Combobox that it's different, but that is not the problem because I put it in an if, the issues it's that I can't put inside this sub all the three-component. After all, it tells me that the windows form button cannot be a textbox, etc. Do I need to put another two event handlers for textbox and Combobox? (The code below it's a workaround, but I Like to do this with a button)

Public Sub btn_Click(sender As System.Object, ByVal e As System.EventArgs)
        'Dim btn As New Button
        'btn = CType(sender, Button)
        'Dim txt As New TextBox
        'txt = CType(sender, TextBox)
        Dim cbx As New ComboBox
        cbx = CType(sender, ComboBox)
        TextBox4.Text += cbx.SelectedItem.ToString & vbCrLf
    End Sub

not displaying the union and intersection of sets in output

558fe5180e0e8fc922d31c23ef84d240
#include<iostream>
using namespace std;
class Sports
{
    public:
        int tennis;
        int badminton;
        int cricket;
        int setA[20],setB[20],setC[20];
        int ab[20],bc[20],ca[20],abc[20];
        int n1,n2,n3,n4=0,total;
        void accept();  // method for accept the input
        void intersection();    //method for calculate intersection
        void display(); //method for display intersections
};
void Sports :: accept()
{
    cout<<"Enter the total number of players who play Tennis: "<<endl;
    cin>>tennis;
    cout<<"Enter the student roll no who play Tennis "<<endl;
    for(int i=0; i<tennis; i++)
        cin>>setA[i];

    cout<<"Enter the total number of players who play Badminton: "<<endl;
    cin>>badminton;
    cout<<"Enter the student roll no who play Badminton "<<endl;
    for(int i=0; i<badminton; i++)
        cin>>setB[i];

    cout<<"Enter the total number of players who play cricket: "<<endl;
    cin>>cricket;
        cout<<"Enter the student roll no who play cricket "<<endl;
    for(int i=0; i<cricket; i++)
        cin>>setC[i];

}
void Sports :: intersection()
{
    // Logic for intersection SET-A and SET-B

    for(int i=0;i<cricket;i++)
    {
         for(int j=0;j<badminton;j++)
         {
            if(setA[i]==setB[j])
            {
                ab[n1]=setA[i];
                n1++;
            }
         }  
    }

    // Logic for intersection SET-B and SET-C
    for(int i=0;i<badminton;i++)
    {
         for(int j=0;j<cricket;j++)
         {
            if(setB[i]==setC[j])
            {
                bc[n2]=setB[i];
                n2++;
            }
         }  
    }
    // Logic for intersection SET-C and SET-A
    for(int i=0;i<cricket;i++)
    {
         for(int j=0;j<tennis;j++)
         {
            if(setC[i]==setA[j])
            {
                ca[n3]=setC[i];
                n3++;
            }
         }  
    }
    //logic for A union B union C
    for(int i=0;i<tennis;i++)
    {
         for(int j=0;j<badminton;j++)
         {
            for(int k=0;k<cricket; k++)
            {
                if(setA[i]==setB[j] && setA[i]==setC[k])
                {
                    abc[n4]=setA[i];
                    n4++;
                }
            }
         }  
    }
   total=tennis+badminton+cricket-n1-n2-n3+n4;  
}
void Sports :: display()
{
    //logic for print intersection of tennis and Badminton
    cout<<"\nIntersection of SET-A and SET-B: ";
    for(int i=0; i<n1; i++)
        cout<<ab[i]<<" ";

    //logic for print intersection of Badminton and Cricket  
    cout<<"\nIntersection of SET-B and SET-C: ";
    for(int i=0; i<n2; i++)
        cout<<bc[i]<<" ";

    //logic for print intersection of Cricket and Tennis
    cout<<"\nIntersection of SET-C and SET-A: ";
    for(int i=0; i<n3; i++)
        cout<<ca[i]<<" ";

    // logic for print intersection of Tennis and Badminton and Cricket
    cout<<"\nIntersection of SET-A and SET-B and SET-C: ";
    for(int i=0; i<n4; i++)
        cout<<abc[i]<<" ";

    // logic for print total number of students in a class
    cout<<"\nTotal number of students in class are : "<<total;
}
int main()
{
    Sports s;
    s.accept();
    s.intersection();
    s.display();
    return 0;
}

pll.png

PHP – Incrementing element with the same name.

558fe5180e0e8fc922d31c23ef84d240

If you download multiple files with the same name, a number is automatically added to the file name, for example: filename(1), filename(2) etc..

What I am trying to do is when I am creating a name and there is already a same one, the name I create to appear in the list as: name(1), name(2) etc.

This is the code that I use now that only creates: name and name (1), then I get this error when trying to create the next same name, example: name (1) already exists in your list., but I shouldn't get that error and should create the next name in the list: name (2) etc..

$deviceUser = "07NAV" . $var;
$sameNames = $mktApi->comm("/ppp/secret/getall", array(
    ".proplist" => ".id",
    "?name" => $deviceUser
));

$i = 0;
if($sameNames) {
    $i++;
    $mktApi->comm("/ppp/secret/add", array(
        "name" => $deviceUser . " ($i)",
        "remote-address" => $IPs[$ipAddress],
        "password" => $devicePass,
        "service" => "pppoe",
        "comment" => $fullAddress
    ));
}

Also, I've tried using this one:

$i = 0;
if($sameNames) {
    for($i = 0; $i < 99999; $i++) {
        $i++;
        $mktApi->comm("/ppp/secret/add", array(
            "name" => $deviceUser . " ($i)",
            "remote-address" => $IPs[$ipAddress],
            "password" => $devicePass,
            "service" => "pppoe",
            "comment" => $fullAddress
        ));
    }
}

but when I create only one name in my list, automatically creates X names and I do not want that.
I've been searching for help on other communities too and somebody provided me this code, but I still get the same error ("user with same name already exists"):

// Start your update here:
$i = 0;
$deviceUser = $deviceUserOriginal = "07NAV" . $var;
$sameNames = false;
do {
    // First - check if a dupe exists...
    $sameNames = $mktApi -> comm("/ppp/secret/getall", array(
        ".proplist" => ".id",
        "?name" => $deviceUser
    ));

    // Second - update and prepare for rechecking ...
    if($sameNames === true) {
        $i ++;
        $deviceUser = $deviceUserOriginal . "(". $i .")";
    }

    // Finally, below, if check failed, cycle and check again with the new updated name...
}
while($sameNames === true);

// Finally, tidy up.
// If you need the original value of $deviceUser you can retain it.
unset($i, $deviceUserOriginal);

// Continue your script here:
$mktApi -> comm("/ppp/secret/add", array(
    "name" => $deviceUser,
    "remote-address" => $IPs[$ipAddress],
    "password" => $devicePass,
    "service" => "pppoe",
    "comment" => $fullAddress
));

Google’s Chrome 97 Release Includes Controversial Keyboard API

Featured Imgs 23

Google’s release of Chrome 97 this week brings along with it the formal introduction of the heavily criticized keyboard API. This API simplifies the identification of key presses in non-standard keyboard layouts, while also introducing potential privacy issues that developers from Apple and Mozzila have criticized.

The Google announcement of the new API outlined the reasons why the company decided to include this API in the Chrome 97 release:

Anariel Design Releases Bricksy, Its Third WordPress Block Theme

Featured Imgs 08

Yesterday, Anariel Design’s third block theme, Bricksy, went live in the WordPress.org directory. Ana Segota, the co-founder and self-proclaimed “creative motor” of the company, has almost become a master at block-based theme design at this point, and this project is just her showing off her skills.

I actually took the theme for a spin over the weekend when I saw it was waiting in the review queue, so I have had a few days to play around with it. Despite a few trivial issues, it has quickly become one of my favorite block themes.

Bricksy WordPress theme home/blog page.  Header shows logo and menu. It is followed by a three-column section of Cover blocks with background images that include a header and button. Following that is a two-column grid of posts.
Bricksy blog page design.

While I have generally liked Anariel Design’s two previous block themes, Naledi and Clove, I could not see myself installing them on a real-world project. They were simply not my personal style. However, Bricksy is a theme I would definitely use if I had a project for it at the moment.

One of my favorite design elements is the cursive handwriting for the site logo, which is also used across various patterns.

Offset three columns of team member sections with images, names, roles, and social links.  In the center, there is a cursive header that reads "freedom," followed by "Our Team".
Team Alternative pattern with cursive header image.

The downside is that these are images, so they are not easily recreated by end-users without Photoshop chops. I would like to see the team reconsider using a handwriting-style font — maybe one from Google Fonts — that allows users to add custom text directly from the editor.

Bricksy has, hands down, some of the most beautifully-designed patterns I have seen in a block theme yet. In total, there are 32.

WordPress block pattern explorer, which displays a categories panel on the left and a three-column grid of patterns on the right.
Bricksy’s general block patterns.

It is making an early bid for my favorite theme of 2022, but I will not get ahead of myself. We still have almost an entire 12 months to go before I make that call.

It even includes a custom social links layout. More and more themes are bundling their own takes on this pattern, but Bricksy’s color scheme and default Cover block image stand out.

Cover block with a background of a pier over a lake. Content contains image, title, subtitle, link buttons, and a social links menu.
Social Links block pattern.

With 32 patterns, I could dedicate an entire post to them all, but I am limited on time. For the most part, they are layout-focused rather than industry-focused patterns. This means they can be used on a vast range of sites. However, the pricing tables and team sections make sense for small businesses. Bricksy also supports WooCommerce.

The most striking thing about each pattern is that they all seem to fit within the theme’s overall design. Often, when themes include dozens of block patterns, some of them can feel like an additional option simply for the sake of adding one more thing in. And, that never feels like the case with Bricksy.

For long-form content, the theme is decent. However, it could be better. Its 720px content width and 18px font size can quickly grow hard to read. Cutting the width anywhere from 80px to 120px makes it much more comfortable. Bumping the font size up a couple of extra pixels works too.

When I first activated the theme, I thought it was utterly broken. I had wondered how it managed to slip through the review system. The theme’s header was outputting seemingly random demo content. But, it was also familiar. I was positive it was a test post from my install.

Header of a website is erroneously displaying the content of a post, which is a table, image, and list.
Nav menu showing a blog post’s content.

The issue was tough to hunt down. After everything from deactivating plugins to scrubbing templates from the database, I finally found it. The ref key for the Navigation block in the theme’s header.html template part was the culprit. Bricksy pointed to a specific post ID in the code:

<!-- wp:navigation {"ref":4790,"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"}} /-->

4790 is the ID of a literal post on my test install, so the Navigation block showed its content instead of a menu. Most likely, this was directly copied or exported from the site editor. Theme authors need to watch out for specific ID references in their code when building from the editor, making sure to remove them before shipping.

Aside from a couple of trivial issues and a single OMGBBQ one after activation, I enjoyed using the theme. It has found its place in my recommended-themes list.

Should CSS Override Default Browser Styles?

Category Image 052

CSS overrides can change the default look of almost anything:

  • You can use CSS to override what a checkbox or radio button looks like, but if you don’t, the checkbox will look like a default checkbox on your operating system and some would say that’s best for accessibility and usability.
  • You can use CSS to override what a select menu looks like, but if you don’t, the select will look like a default select menu on your operating system and some would say that’s best for accessibility and usability.
  • You can override what anchor links look like, but some would say they should be blue with underlines because that is the default and it’s best for accessibility and usability.
  • You can override what scrollbars look like, but if you don’t, the scrollbars will look (and behave) the way default scrollbars do on your operating system, and some would say that’s best for accessibility and usability.

It just goes on and on…

In my experience, everyone has a different line. Nearly everybody styles their buttons. Nearly everybody styles their links, but some might only customize the hue of blue and leave the underline, drawing the line at more elaborate changes. It’s fairly popular to style form elements like checkboxes, radio buttons, and selects, but some people draw the line before that.

Some people draw a line saying you should never change a default cursor, some push that line back to make the cursor into a pointer for created interactive elements, some push that line so far they are OK with custom images as cursors. Some people draw the line with scrollbars saying they should never be customized, while some people implement elaborate designs.

CSS is a language for changing the design of websites. Every ruleset you write likely changes the defaults of something. The lines are relatively fuzzy, but I’d say there is nothing in CSS that should be outright banned from use — it’s more about the styling choices you make. So when you do choose to style something, it remains usable and accessible. Heck, background-color can be terribly abused making for inaccessible and unusable areas of a site, but nobody raises pitchforks over that.


Should CSS Override Default Browser Styles? originally published on CSS-Tricks

What is a landing page?

Featured Imgs 11

A landing page is any web page that a consumer can land on, but in the marketing realm, its usually a standalone page, distinct from your homepage or any other page, that serves a single and focused purpose. A landing page is a follow up to any promises that youve made in your content. Essentially, its the next step toward a visitor becoming a customer. Your landing page lets you make a trade, some sort of special offer, piece of information or a deal, in return for providing contact information.

How to Fix ‘Comments Are Closed’ in WordPress (Beginner’s Guide)

Category Image 091

Are you seeing the ‘Comments are closed’ message on your WordPress posts?

This message is displayed when comments have been disabled on a post. However, some users report seeing the message unexpectedly.

In this article, we’ll show you how to fix ‘Comments are closed’ in WordPress.

How to Fix 'Comments Are Closed' in WordPress (Beginner's Guide)

What Is the ‘Comments Are Closed’ in WordPress Error?

The comment area of your WordPress blog allows your website visitors to give feedback, ask questions, offer their own point of view on the topic, and respond to other comments.

Comments are disabled on all WordPress pages by default, and you won’t see the ‘Comments are Closed’ message on pages. However, you can still follow the steps below to open comments on your pages as well as posts.

For blog posts, you can disable comments on specific posts or on your entire WordPress website. For example, you may wish to disable comments on an announcement post.

When you disable comments on a post that has at least one comment, you will see the message ‘Comments are closed.’ This explains to your visitors that even though there are comments on the post, no further comments can be left.

The 'Comments are closed' Message

If you disable comments on a post that has no comments, then you won’t see the ‘Comments are closed’ message. WordPress will simply not display the comment form.

Perhaps you’re seeing the ‘Comments are closed’ message on your website unexpectedly. While WordPress is easy to use, some error messages can be hard to troubleshoot for beginners. That’s why we put together a list of the 50 most common WordPress errors and how to fix them.

This message is most likely being shown because of a WordPress setting that’s not configured correctly. That’s because WordPress has comments settings in multiple areas, which can make it hard for beginners to find the right settings to fix the problem.

In this post, we’ll walk you through all the settings you should check in order to reopen the comments on your blog posts.

With that being said, let’s look at how to fix ‘Comments are closed’ in WordPress.

Enable Comments on Future Posts

Comments are often closed on a WordPress site because at some time in the past a setting was checked was that disables comments on new posts by default.

You can check this setting by navigating to Settings » Discussion. Here you’ll find a set of checkboxes that control how comments are handled on new posts.

Enable Comments for Future Posts from Settings » Discussion

The first setting to look at is ‘Allow people to post comments on new articles’. This box should be checked so that the default setting for future posts is to allow comments.

Next, look at ‘Automatically close comments on articles older than XX days’. This setting is useful if you don’t want users to be able to comment on older posts. However, if you want to allow comments on all posts, then you should make sure this box is unchecked.

Once you’re happy with the discussion settings, make sure you click the ‘Save Changes’ button at the bottom of the screen to store the settings.

This will make sure comments are open on all new posts you create. But it will not enable them on posts that have already been created.

That’s what we’ll do in the next step.

Enable Comments on a Specific Post

This method will show you how to enable comments on existing posts one at a time. However, if you wish to enable comments on many posts, then you should follow the ‘Enable Comments in Bulk’ method that we cover below.

If you use the block editor on your WordPress site, then you need to scroll down the settings pane on the right of the screen until you come to the Discussion panel.

Now you should click on ‘Discussion’ to expand the options, and then make sure the ‘Allow comments’ box is checked.

Allow Comments on a Post or Page

Once you click the Update button at the top of the screen to save the setting, comments will be enabled for this post.

You should repeat these steps to enable comments on other blog posts. You can also follow the same process to enable comments on WordPress pages.

How to Display the Discussions Panel if It Is Hidden

While the Discussions panel is displayed by default, it may be hidden on your website. If you can’t find it, then you will need to click the Options icon at the top right of the screen. This icon looks like 3 vertical dots.

Post Preferences

You then need to click on ‘Preferences’ and navigate to the ‘Panels’ tab. Once there, you can toggle the ‘Discussions’ switch on so that the panel is displayed.

Toggle the Discussions Panel On

Enable Comments on a Specific Post (Classic Editor)

If you are using the classic editor, then the steps for enabling comments on a post are a little different. Here, the Discussion meta box is hidden by default. To display it, you will need to click on ‘Screen Options‘ at the top right of the screen.

Edit the Post and Click Screen Options

Next, you should check the Discussion box under ‘Screen elements’. After that, simply click ‘Screen Options’ again to return to your post.

Make Sure the Discussions Screen Element is Checked

You can now scroll down to the bottom of your post where you will find the Discussion meta box. You should make sure the ‘Allow comments’ box is checked.

Make Sure Allow Comments Is Checked

After you click the Update button to save the setting, comments will be enabled for this post.

Enable Comments on Posts in Bulk

If you need to enable comments on multiple posts, then you can update them in bulk. To do that, navigate to the Posts » All Posts page where you will find a list of all of your posts.

You need to select the posts that have comments disabled by clicking the checkbox next to each post.

After that, you should choose ‘Edit’ from the Bulk Actions dropdown box and then click the ‘Apply’ button. This will open the bulk edit screen.

Edit Multiple Posts at Once With Bulk Actions

Here you need to click the ‘Comments’ drop down menu and then select ‘Allow’.

Don’t forget to click the ‘Update’ button to change the setting for all selected posts.

Allow Comments for Multiple Posts at Once

How to Select All Posts At Once

If you want to enable comments for every post on your website at once, then following the steps above would take a lot of time if you have hundreds of blog posts on your site.

To do it faster, there are a few extra steps you should take. First, you will need to make sure that all posts are displayed on a single page.

You can see a count of all the posts on your website under the ‘Posts’ title at the top of the screen. If you have 20 posts or less, then they are already displayed on one page. If you have more than 20 posts, then you will have to increase the number of items per page.

To do that, you should click ‘Screen Options’ at the top of the page. Then, under Pagination, find the ‘Number of items per page’ setting. Here you will need to type a number larger than the total number of posts on your site.

Ensure All Your Posts Are Displayed on a Single Page

For example, if you have 65 posts on your website, then you could type the number 70.

After that, you need to click the ‘Apply’ button and all of your posts will be displayed on one page. You can now click ‘Screen Options again to hide the settings.

You can now select every post on your site by simply clicking the checkbox next to ‘Title’.

Click the Checkbox Next to Title to Select All Posts

To enable comments on all of these posts, you should click ‘Bulk Actions’ then ‘Edit’, and follow the steps we covered earlier in this section to change the Comments setting to ‘Allow’.

Note: We don’t recommend trying to update hundreds of blog posts at once if you have slow web hosting, since your site may time out or freeze up before completing all the updates.

Check for Incompatible Themes or Plugins

If you have tried all of the steps above and comments are still disabled on your site, then it may be because of an incompatibility with your theme or one of your plugins.

Sometimes poorly coded WordPress themes may wrongly display the ‘Comments are closed’ message even when comments are open.

To check if your theme is the problem, you should navigate to Appearance » Themes and temporarily activate some other theme.

Enable a Different Theme to See if the Issue Is Resolved

If the ‘Comments are closed’ message is now fixed, then your theme is the problem. You can ask the theme developer to fix the issue. For more details, see our guide on how to properly ask for WordPress support and get it.

Alternatively, if you’re an advanced user, then you can try to fix the issue yourself. You need to refer to our guide on how to disable comments in WordPress, and then follow the instructions under ‘Remove “Comments Are Closed” in WordPress’.

If you think a plugin may be causing the issue, then you can head over to Plugins » Installed Plugins and make sure you haven’t installed a plugin designed to disable comments, such as Disable Comments. If you have, then simply disable that plugin and test to see if comments are now working.

If comments are still closed, then you need to test for incompatible plugins. You’ll need to temporarily deactivate one plugin at a time by clicking its ‘Deactivate’ link.

Deactivate Plugins One at a Time to See if the Issue Is Resolved

Now test to see if comments are enabled on your site. If they are still not working, then this plugin is not the problem. Simply click its ‘Enable’ link and move on to the next plugin.

We hope this tutorial helped you learn how to fix ‘Comments are closed’ in WordPress. You may also want to learn how to increase your blog traffic, or check out our list of the best social media plugins for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Fix ‘Comments Are Closed’ in WordPress (Beginner’s Guide) first appeared on WPBeginner.

WordPress 5.9 to Fix Lazy Loading Performance Regression, Resulting in 30% Faster Page Loads in Some Cases

Category Image 006

WordPress sites may soon see a slight performance improvement on page loads, thanks to a fix for a performance regression in the core lazy loading feature. An analysis published in July 2021 showed that lazy loading applied too aggressively can have a negative impact on performance and that it’s better to eagerly load the images within the initial viewport.

WordPress’ default of lazy loading all images was causing slower performance on the Largest Contentful Paint metric (LCP) metric, which Google defines as “the render time of the largest image or text block visible within the viewport, relative to when the page first started loading.”

Google-sponsored WordPress contributors wrote a fix that avoids lazy-loading images above the fold and thoroughly tested it as part of their efforts to evaluate the impact of various past performance initiatives. The delayed LCP will be fixed in WordPress 5.9.

“This can be improved by skipping addition of loading='lazy' for the first content image or iframe, which in the vast majority of cases will appear within the initial viewport,” Felix Arntz said in the dev note. “WordPress can only make educated guesses around that and not be 100% certain, but an analysis taking into account 50 popular themes showed that the enhancement brought LCP improvements across the board, up to 30% faster page load.” 

In the future, this implementation may be able to drill down further into the block content on the page and eagerly load whatever images the theme identifies as being within the viewport.

“Have you thought about how we could have more precise heuristics going forwards that can take the semantics and structure of blocks into account to get a sense for what is actually deferrable?” Matias Ventura commented on the ticket in process. “For example, an image block or a site logo used in a header template part would be strong indicatives of being above the fold. ‘The first image of the content’ seems instead like a rudimentary measure, that varies a lot depending on preceding layout. With block themes we should have some ahead-of-time awareness of layout which we can use to produce more meaningful instructions.”

Felix Arntz said he already has detecting the header template part on his radar and is willing to refine the implementation as the world of block themes expands.

“The refinement of the lazy-loading implementation should notably improve LCP performance for most sites that rely on it, while not having adverse effects for sites where the default heuristics described above do not apply to,” Arntz said. “That is only a solid starting point though. In the future, specifically with the more semantic content specification that block-based themes will facilitate, we will be able to further fine tune the lazy-loading implementation by using the available block information.”

get combined textbox text into a new one in sorted checkedbox order

558fe5180e0e8fc922d31c23ef84d240

Hi, I have a question, how can I achieve this, like I have declared 3 variable as string, each checkbox has a variable that will be created if clicked also when checked it will put the corresponding textbox.text into it. Now the problem is I need to make sure that the first one that will be selected will be the first one that will be paste thanks to the variable, the seond checked and third checked same thing. This is the code

 Private Sub CheckBox2_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged
        Dim fntext As String
        Dim artext As String
        Dim dltext As String
        If CheckBox3.Checked = True Then
            fntext = TextBox1.Text
        ElseIf CheckBox4.Checked Then
            artext = TextBox4.Text
        ElseIf CheckBox5.Checked Then
            dltext = TextBox6.Text
        End If
    End Sub
    TextBox7.Text += fntext & vbCrLf & artext & vbCrLf & dltext
End Class