• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

wordpress

Change WordPress URL

June 6, 2021

There are multiple ways to change URL in WordPress.

Here’s one via wp-config.php.

define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );

define( 'WP_HOME', 'http://example.com' ); define( 'WP_SITEURL', 'http://example.com' );

If you have a redirect in Apache, comment it out.

#Redirect permanent / https://yourdomain.com/

#Redirect permanent / https://yourdomain.com/

This is by far the easiest way to change URL in WordPress.

Filed Under: Linux, WP Tagged With: change, config, url, wordpress, wp-config.php

Disable Gutenberg

February 27, 2021

Two years ago, WordPress introduced Gutenberg block editor together with the release of WordPress version 5.0. Gutenberg essentially became the default editor starting with WordPress version 5.0. While many people love the Gutenberg editor, some people hate it. If you’re one of the many people who hate the Gutenberg editor, you can simply disable it by installing a plugin called Disable Gutenberg. This plugin will revert back to the classic editor.

Once installed, you should be able to see the Classic editor.

After working with Gutenberg for so long, I forgot the speed and agility of the classic editor. It’s much faster.

Filed Under: WP Tagged With: classic, disable, editor, gutenberg, wordpress

SendGrid with WordPress

November 18, 2020

If your instance is not configured to send out email, you have several options to choose from. One option is to use a service called SendGrid. You can sign up on their site and obtain an API key. To start using with WordPress, you simply install a plugin called WP Mail SMTP and supply the API key on the plugin and off you go. I use Contact Form 7 to send out email from a form. There are no issues using Contact Form 7 and SendGrid. In addition to SendGrid, the plugin also works with other email providers such as AWS, Gmail, Outlook, Zoho, Mailgun to name just a few.

Filed Under: Linux Tagged With: contact form 7, email, form, sendgrid, smtp, wordpress, wp mail smtp

Disable Post Title in Genesis

September 13, 2020

Here’s how to disable the post title in Genesis WordPress themes. Add code in themes.php.

add_filter( 'genesis_link_post_title', '__return_false' );

add_filter( 'genesis_link_post_title', '__return_false' );

Filed Under: WP Tagged With: disable, genesis, link, post, theme, title, wordpress

Custom Breadcrumbs

September 13, 2020

I’ve customized my breadcrumbs. Add code to functions.php.

add_filter('genesis_breadcrumb_args', 'customize_breadcrumbs');
function customize_breadcrumbs($args) {
    $args['labels']['prefix'] = 'Home';
    $args['home'] = '';
    $args['sep'] = '/';
    return $args;
}

add_filter('genesis_breadcrumb_args', 'customize_breadcrumbs'); function customize_breadcrumbs($args) { $args['labels']['prefix'] = 'Home'; $args['home'] = ''; $args['sep'] = '/'; return $args; }

Now it doesn’t say Home/Home on the front page.

Filed Under: WP Tagged With: breadcrumbs, customize, wordpress

Center Search Widget

August 1, 2020

Here’s how to center the Search widget in a WordPress Page or a post. This applies only if you’re using the default Search Widget. Div classes may vary based on theme being used. The CSS example below may not work for your theme. Check your theme’s source code to be sure.

.entry-content .wp-block-search {
  display:block;
  margin-left:auto;
  margin-right:auto;
  text-align: center;
}
.entry-content .wp-block-search label {
  display:none;
}
.entry-content .wp-block-search input {
  width:250px;
}

.entry-content .wp-block-search { display:block; margin-left:auto; margin-right:auto; text-align: center; } .entry-content .wp-block-search label { display:none; } .entry-content .wp-block-search input { width:250px; }

The CSS above centers the search block. It suppresses the search label, and finally sets the form’s input to a fixed width of 250px.

Filed Under: WP Tagged With: center, class, css, div, search, wordpress

Revolution Theme

July 26, 2020

I’m now using the Revolution theme from StudioPress. It’s a minimal design with lots of whitespace. The default font is Playfair Display which highlights headlines and blockquotes. The Playfair Display is available from Google Fonts if you’re interested. I think it’s a perfect theme for a photography blog. Although the theme seems to invite you to write more, something I haven’t been doing lately. And before I sign off, let’s take a look at what a blockquote looks like. Not bad at all. A beautiful theme.

It’s a minimal design with lots of whitespace.

By Studiopress

Filed Under: WP Tagged With: revolution, studiopress, theme, wordpress

Genesis Footer

July 25, 2020

Here’s how to display Copyright years in the footer section if you’re using the Genesis theme.

[footer_copyright first="2002"]

[footer_copyright first="2002"]

Result:

Copyright © 2002–2020

Copyright © 2002–2020

The current year is dynamic. It will display 2021 a year from now. The first year is always fixed.

Filed Under: WP Tagged With: copyright, custom, footer, genesis, wordpress, year

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to page 4
  • Go to Next Page »
  • Home
  • About
  • Archives

Copyright © 2023