Google Sites’ update put me in a bad situation. I’m pretty busy as is, but the new Sites doesn’t fit my needs as well as I would like. Not to mention that the old Sites was slow and unresponsive. So I find myself in the position of moving a Google Sites-based site to my WordPress server–or rather, remaking the site with new customizations.

I chose the default 2017 WordPress theme because it looks professional. I used the Quest them and other themes for other sites, but this theme seems customizable enough for my needs.

And yet, that brings a few problems.

Number 1: I need a sidebar.

Presto, there’s a plugin (here, thanks [email protected] Institute) to restore the lost sidebar! However:

Is it possible to move sidebar to the left?

Not with this plugin, it simply adds the Blog Sidebar to all pages.

Onto problem 2!

Problem 2: The sidebar is on the right.

Presto! Someone has already fixed that (here, thanks [email protected]!).

 @media screen and (min-width: 48em) {
 .has-sidebar #secondary {
 float: left;
 }
 .has-sidebar #primary {
 float: right;
 }
 .has-sidebar:not(.error404) #primary {
 float: right;
 }
 }

But then, the sidebar is really big!

Problem 3: The sidebar is really big!

Someone has already fixed that, too (here, thanks [email protected])!

#primary {
width: 70% !important;
}

*** 3rd — decrease right sidebar width ***

.has-sidebar #secondary {
width: 26% !important;
}

Well, the content is still not wide enough.

Problem 4: The default “full-width” is not full-width enough.

Presto, there’s CSS to fix that (here, thanks [email protected] !

.wrap {
    /* margin-left: auto; */
    /* margin-right: auto; */
    max-width: 100%;
    /* padding-left: 2em; */
    /* padding-right: 2em; */
}
 
@media screen and (min-width: 48em) {
    .wrap {
        max-width: 100%;
        /* padding-left: 3em; */
        /* padding-right: 3em; */
    }
}
 
.page.page-one-column:not(.twentyseventeen-front-page) #primary {
    /*margin-left: auto;*/
    /*margin-right: auto;*/
    max-width: 100%;
}

@media screen and (min-width: 30em) {
    .page-one-column .panel-content .wrap
    {
        max-width: 100%;
    }
}

Solution (My Edits):

.site-info { display: none; }

.wrap {
/* margin-left: auto; */
/* margin-right: auto; */
max-width: 90%;
/* padding-left: 2em; */
/* padding-right: 2em; */
}

@media screen and (min-width: 48em) {
.wrap {
max-width: 90%;
/* padding-left: 3em; */
/* padding-right: 3em; */
}
}

.page.page-one-column:not(.twentyseventeen-front-page) #primary {
/*margin-left: auto;*/
/*margin-right: auto;*/
max-width: 90%;
}

@media screen and (min-width: 30em) {
.page-one-column .panel-content .wrap
{
max-width: 90%;
}
}

@media screen and (min-width: 48em) {
.has-sidebar #secondary {
float: left;
width: 15% !important;
}
.has-sidebar #primary {
float: right;
width: 80% !important;
}
.has-sidebar:not(.error404) #primary {
float: right;
width: 80% !important;
}
}

#comments {
display: none !important;
}

Other fun stuff

See JimmyKnoll.

White space issues

See WP.org.

Remove “Powered by WordPress”

From WordPress.org

.site-info { display: none; }

How do you increase the default wordpress file size limit? There are several different things to do:

  1. Increase the file size in Settings> Media or Network> Settings for multisite
  2. Increase the file size in php.ini (/etc/php-version-and-type-/php.ini)

Find these settings and change them to your desired file size:

Note that memory_limit must be larger than post_max_size must be larger than upload_max_filesize.

 

Resources: 1, 2

While trying to troubleshoot some JetPack issues today, I ran into a new WordFence issue. A couple, actually. Here are the problems and the solutions:

WordFence does not cache WordPress anymore.

They removed the Falcon cache. Use CloudFlare instead!

Source

The WordFence Firewall page pops up an error.

You might see this error:

We were unable to write to ~/wp-content/wflogs/ which the WAF uses for storage. Please update permissions on the parent directory so the web server can write to it.

This is because WordFence added a new wflogs folder, which could have the wrong permissions set. Navigate to the folder and set the correct permissions.

cd /var/www/(PATH TO WORDPRESS)/wp-content/
chmod 755 wflogs
chown (WWW USER):(WWW GROUP) wflogs

Also, some users running wp-cron as a scheduled Linux cron job instead of on a per-access wp-cron job may run into an error where the cron job resets permissions to root. Remove the cron job from crontab and add a cron job in cron.d

cd /etc/cron.d
sudo nano wpcron

### Call wp-cron every 10 minutes
*/10 * * * * www-data /usr/bin/wget -q "http://www.tgmgroup.org/wp-cron.php?doing_wp_cron"

CTRL-X / y

Source

The WordFence Firewall wants me to use Extended Protection.

Extended Protection loads the firewall before loading any WP functions or plugins, making it more secure. Apache may only require an .htaccess rule that WF probably self-generates. You need to adjust your Nginx configuration to hide the .user.ini file, though.

location ~ ^/wordpress/\.user\.ini {
    deny all;
}

Source

 

The other day, I accidentally overwrote an older post. Luckily, I have daily backups running, so it wasn’t too hard to get a backup SQL file. But my backups are all SQL files, so I had to think hard about how to edit one.

I first tried downloading all kinds of database editors that only wanted to connect to a remote SQL database. Since my file was local, I didn’t want this.

As it turns out, the database files weren’t necessary. NotePad and NotePad++ are easily capable of opening text-based SQL files. which only require a search, a removal of \n and \f lines, editing of \” lines, and then a reposting onto WordPress.

Kind of a “duh” moment. Try what you have before you go wild with useless effort.

I’m a big fan of the masonry/grid style layout of Pinterest, and I wanted to bring that look to my own websites.

I started with DW Wallpress, which has a very nice layout. It’s not a full-width theme, though, limiting itself unnecessarily to something like 1000px width.

I changed to the MetroX and MetroX Pirate themes, which look pretty cool, but aren’t actually that intuitive.

I changed to Besty, a very nice theme with dual side bars, which works well since I have a wiki where a list of all pages is nice. But it’s seriously limited in several options.

 

And now I run with Fluida. It is much more customizable and runs pretty quickly. I’m pretty happy with it, but the endless tinkerer that I am, that might change…

I’ve been playing around with Facebook Logins (Developer Apps) so that I can get social logins to work with WordPress. There have been a few problems with it so far:

  1. Facebook tells me there is an OAuth error, but it doesn’t tell me how to fix it.

So, I looked a the help page they linked, looked through all the Basic and Advanced settings, but the OAuth section wasn’t there! Where was it? Under Products> (App Name). Move fast and break things indeed!

  1. Facebook limits the number of domains I can use.

Well, I want to add a lot of domains for my WP MultiSite, but apparently, you can only use 5 domains, and only 1 website at that. How to work around this? Add a new Facebook Canvas or App and put the domain there. Then you can add multiple website domains. It is probably recommended to add a new app for each domain, but I’m not too serious a developer yet.

Well, apparently, WordPress supports iframes by default now. I updated an old post that needed an iframe, and spent a lot of time looking for plugins for it, but it turns out, that wasn’t necessary.

Read more here.

I was wondering what happened to the sites I was running the other day. Why didn’t my images show up? I re/un/installed speed booster pack, some lazy image loader plugin, and whatnot. It took a long time.

Then I realized that my images are loading off of my primary domain, not my “primary” domain–as I am a multisite user that encourages the use of the primary domain, so that I don’t have to always log into different “primary” domains. Not realized, rather, but trying to click on the image and Cloudflare giving me an error.And if I am loading off of my primary domain, it means I can’t “hotlink” to my other domains.

So, I turned off hotlinking, and voila! days of trying to solve the problem and wondering what happened solved!

 

 

Photo by WalkInfo

Chris Lema reviews a few drag-and-drop visual WordPress editors on his website. Of course, paid options are the highest scoring. But a few, such as PageBuilder by SiteOrigins and Make, can also be had for free. Look at his site for more information.