Tag: wordpress

Adding TOC in WordPress Posts

Adding TOC in WordPress Posts

Installation

Install Easy Table of Contents plugin, and active it and click on settings to setup.

Settings

Following settings to be set.

Setting Value Description
Enable Support Posts
Auto Insert Posts
Show when 4 Less than 4 headers, won't show toc
Initial View False
Float Right
Title Font Size 50%
Font Size 80%
Headings Header 1 disable Don't show Header 1

Hide title in blog body when displayed in blog list in WordPress

Hide title in blog body when displayed in blog list in WordPress

In order to have a complete document in each blog, blog title is saved in blog body as well.

Blog appears in blog list with title in blog body.

screen

Blog appears in blog list without title (hidden) in blog body.

screen

To hide the blog title in blog list, which is in <h1> or # form, using following code.

.wpbstarter-blog-list .entry-content h1 {
  display: none;
}

Another way to hide it, this can have more control.

.wpbstarter-blog-list .entry-content h1 {
  font-size: 0;
  width: 1px;
  height: 1px;
  display: inline-block;
  overflow: hidden;
  position: absolute!important;
  border: 0!important;
  padding: 0!important;
  margin: 0!important;
  clip: rect(1px,1px,1px,1px);
}

Create your website with blocks

Create your website with blocks

This is an example page from WordPress.

Add block patterns

Block patterns are pre-designed groups of blocks. To add one, select the Add Block button [+] in the toolbar at the top of the editor. Switch to the Patterns tab underneath the search bar, and choose a pattern.

Frame your images

Twenty Twenty-One includes stylish borders for your content. With an Image block selected, open the "Styles" panel within the Editor sidebar. Select the "Frame" block style to activate it.

Overlap columns

Twenty Twenty-One also includes an overlap style for column blocks. With a Columns block selected, open the "Styles" panel within the Editor sidebar. Choose the "Overlap" block style to try it out.

“Roses Trémières” by Berthe Morisot
“In the Bois de Boulogne” by Berthe Morisot
“Young Woman in Mauve” by Berthe Morisot

Docker Compose – wordpress

Docker Compose - wordpress

Simple steps to start using docker compose to create wordpress dockers.

Installation

Install docker-compose package

Run following command on ubuntu and armbian servers.

apt install docker-compose

Create dockers

Create folder as project name wp

The project name will be used as a part of docker container name.

mkdir -p /app/wp

Create docker compose file

Using vi to create file docker-compose.yml in directory /app/wp

version: "3.3"

services:
  db:
    image: mariadb:latest
    volumes:
      - db_data:/var/lib/mysql
    ports:
      - "3306:3306"
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: somewordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress

  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    volumes:
      - wordpress_data:/var/www/html
    ports:
      - "80:80"
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
volumes:
  db_data: {}
  wordpress_data: {}

Run docker compose command

docker-compose up -d

Destroy dockers

Run docker compose command

docker-compose down

Destroy dockers and their volumes

docker-compose down --volumes