Category: WordPress

  • How To Change Width of Post Content Area In TWENTY TWENTY-ONE WordPress Theme

    How To Change Width of Post Content Area In TWENTY TWENTY-ONE WordPress Theme

    By default the post/page/category/archive content area’s width is less than header/footer/nav/post or page title’s width in the desktop view or large screen size. It’s fucking annoying, not sure why they would do that. Ideally the post etc content area should have same width as title, nav, header footer etc.

    WordPress TwentyTwenty-One Theme Change Post Content Area
    WordPress TwentyTwenty-One Theme Change Post Content Area

    There is very simple way to change it. Just copy following code in your theme’s css or custom CSS in the theme customisation and it will be fixed in no time

    /* Change the content width to be same as header/nav/footer's width */
    @media only screen and (min-width: 822px) {
    	:root {
    		--responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), 1240px);
    	}
    }

  • How To Install WordPress With One Line Of Code

    How To Install WordPress With One Line Of Code

    Install WordPress With Just One Command
    Install WordPress With Just One Command

    There are two ways to install WordPress. First is to download zip file, upload on your web host and unzip files. It’s messy and unproductive.

    The second method and most productive way to install WordPress is via command line. Most of people again use few commands to install WordPress.

    Here is what genius techies like us do, run one line of command and install WordPress.

    Login to your web host and go to the root folder of domain where you want to install WordPress.

    Copy and paste following command line and viola, your WordPress is installed.

    wget http://wordpress.org/latest.tar.gz; tar xfz latest.tar.gz; mv wordpress/* ./; rm -rf ./wordpress/; rm -f latest.tar.gz

    Add Alias to the above command

    If you have a web host such as a dedicated host and wish to install many WordPress sites then you can add above command line as alias in your bash profile.

    vi ~/.bashrc

    Copy and paste following line

    alias installwp='wget http://wordpress.org/latest.tar.gz; tar xfz latest.tar.gz; mv wordpress/* ./; rm -rf ./wordpress/; rm -f latest.tar.gz'

    Save file and run following command

    source ./.bashrc

    Next time you want to install a WordPress on a domain then go to the home directory (www) of that domain and run following command

    installwp