ਪੋਸਟ ਟੈਗ: wordpress

0Wordpress LogoVertically center images in default wordpress gallery

I could­n’t believe a google search did­n’t already turn up the answer for this — it’s crazy that you can­’t just ver­tic­ally-cen­ter the images in a word­press simple image gal­lery. After much faff­ing with CSS I found a simple answer
ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

0Wordpress Logo3 ways to run WP-CRON manually

I’ve recently been look­ing at how best to run wp-cron manu­ally from the sys­tem to avoid a per­form­ance hit when a vis­it­or loads the site. I’ve so far found 3 dif­fer­ent ways to run this. There may be others.
ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

0Wordpress LogoWordPress updates progress

I’ve had an issue for a while now where installing word­press updates does­n’t show any mes­sages or pro­gress. The updates gen­er­ally do install but it is tricky to know when the updates have fin­ished. There are a few threads online with pos­sible solu­tions but most of them haven’t been help­ful in my case.
ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

0Wordpress LogoWordPress visual editor not working

I’ve had an issue for a little while where the word­press visu­al edit­or but­ton stopped work­ing. The code edit­or was fine, and the but­ton for the visu­al edit­or is present but click­ing on it has no effect. After much fid­dling around I finally dis­covered it was being broken by my Con­tent Secur­ity Policy!
ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

0PHP sendmail failing dmarc

I run a VPS which hosts sev­er­al domains. Send­ing mail from these domains has always been tricky. I’ve long used WP SMTP Mail plu­gin for word­press to work around this, but I wanted to get a prop­er fix. After much read­ing I found a prop­er solution
ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

0WordPress Local Gravatar cache

I like to have avatars shown for people who com­ment on my blog. Word­Press sup­ports the gravatar ser­vice nat­ively so enabling this is very easy. How­ever it comes with a cost — access­ing extern­al files from anoth­er domain adds lots of extra load time in the form of new DNS look­ups, new SSL con­nec­tions to make, etc. Would­n’t it be nice to have gravatars stored loc­ally and served from your own serv­er. Well that’s what I’ve been doing for some time now, if you’d like to know how, read on…
ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

0Localisation of Amazon Affiliates links

I occa­sion­ally ref­er­ence products on my vari­ous web­sites, and usu­ally link them to Amazon for any­one inter­ested in buy­ing them. A long time ago I used to link with an amazon affil­i­ates link but nev­er earned any­thing from it as my typ­ic­al read­er­ship is well dis­trib­uted around the world. Unfor­tu­nately Amazon don’t provide a way to redir­ect vis­it­ors to their loc­al amazon site whilst retain­ing to affil­i­ates pay­ments. There are vari­ous solu­tions out there but all the ones I found had issues with them, so I developed my own.… ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

5Wordpress LogoAdsense ads above the last paragraph of a post

You may have noticed that we’ve tweaked how we dis­play our adsense ads. We wanted some small text-only ads near the bot­tom of each art­icle, which would be added auto­mat­ic­ally. This took a little bit of tinker­ing, but even­tu­ally we developed a solu­tion which works well and does­n’t seem to knock page pro­cessing times much. Simply add the fol­low­ing code to your theme’s functions.php (don’t for­get to change your adsense IDs) … ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

0Comment bubbleEasily set the parent of a WordPress comment

As is doc­u­mented in the site update log, for a while we had a prob­lem with our theme where it was­n’t pos­sible to reply to a com­ment so that the reply would appear cor­rectly in a threaded way. We have no fixed this prob­lem, but have been left with a sig­ni­fic­ant num­ber of com­ments which really need edit­ing so it is easi­er to see what they are in reply to. With a stand­ard word­press install this requires going into the data­base and edit­ing there, which is very tedi­ous. Instead, we’ve used some simple func­tions to add an option to the com­ment-edit admin page, to set the com­ment par­ent there. Even­tu­ally this will be developed into a prop­er plu­gin to enable this func­tion­al­ity. For now the code is below, just add it to your theme’s functions.php

ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ

1Comment bubbleJetpack-style comments without Jetpack

One of the best things about word­press is the built-in social aspect provided by com­ments. Get­ting your com­ment sec­tion right can be very import­ant to any web­site, includ­ing ours. Over the years we’ve exper­i­mented with vari­ous com­ment plu­gins includ­ing Dis­qus and more recently Jet­pack. How­ever, we’ve always ended up bring things back in house for man­age­ment, per­form­ance and pri­vacy reas­ons. When I moved back from Jet­pack com­ments I really missed some of the slick fea­tures provided by Jet­pack, both the social-net­work logins and the gen­er­al slick styl­ing. Any­way, to cut a long story short I finally had time today to take a good look at how word­press “does” com­ments and fig­ure out a way to build an in-house sys­tem which looks nice and slick like the com­ment inter­face provided by jet­pack. Best of all its sur­pris­ingly simple and does things the “prop­er” way…
ਪੂਰਾ ਲੇਖ ਪੜ੍ਹੋ