joppot

コピペで絶対動く。説明を妥協しない

ソフトウェア

Limit the number of text characters in wordpress article index by plugin

投稿日:2017年3月16日更新日:

Pocket


Abstract

Hello everybody, It’s candle.
Nowadays, when I used free themes for wordpress at the company, I noticed that.

Many free theme use the_content function which expands all the contents of individual articles in the article list, and it is very irritating.

However, editing a free theme is troublesome.
We use the “Advanced Excerpt” plugin to limit the number of characters displayed in the article list and make it easy to see.

We use the free theme “twentyeleven” as a sample.

Before

After


Premise

There is a wordpress.



Install “Advanced Excerpt” plugin

From the left menu of the management screen, press “Plugins” → “Add new”.

Enter “Advanced Excerpt” into the top right search field.
Press the “Install Now” button .

After installation, you enable plugin.

It’s ok.

Plugin setting

Click the “Settings” of “Advanced excerpt” in the plugin list.

Setting from here, please use it as reference.
Set “Excerpt Length” to “100” and change “Words” in the pull-down menu to “Characters”.

“Finish” value is ok with “Exact”, but it seems that it counts in bytes, and it gets garbled with 2 byte 1 character like Japanese.

Check “Read More Link” and enter “Read more” in the text box.

This setting make the link named “Read more” in the end of trimmed article text.

Finally, there is an item to delete the tag in the article.
I think that deleting the tag is easier to see, so I will set it up

Check “Remove all tags except the following” of “Strip Tags”.
If you want to display a tag exceptionally, checking only that tag will be displayed.

Basic setting is over.
Let’s save by pressing the “Save Changes” button at the bottom.


Chek it

This is the image that before limited cahracters in the twentyeleven theme.

Before

This is the image that remove some characters.
After

The number of characters has decreased, and it is better than before.

Conclusion

The best solution is to edit with themes, but if you want to change easily way, It is ok in this way.

スポンサードリンク

If you think this article is good, share it please

-ソフトウェア
-

執筆者:


comment

Your email address will not be published. Required fields are marked *

関連記事

Write haml with Atom

English 日本語 Abstract Hello everybody, it’s candle. In this time we will write haml with Atom. I’m coding with emacs for all time. but sotimes I use atom. When I open a haml file, there is no coloring and syntax, I try to add plugin. Premise You have Atom editor.

Connect to host mysql from docker container of “docker for Mac”

Abstract Hello everyone it’s me candle. In this post I will show you how to connect to the host mysql from the docker container of mac. For example, you may connect to mysql when running rails, wordpress etc on docker. You may prepare docker of mysql, but it can’t hold data, it is troublesome such as startup time. Then I think that it is very useful if docker can access to the host mysql. Precondition You use docker for mac

Atom imports React component using import-js 2.2.0

Abstract Hello everybody it’s me candle. In this time we will import the component path into the file using import-js and Atom automatically. React recommends to write one component in one file, when development becomes to be big, the number of component increase. If you use 10 components with one Container, you need to write 10 import statements. import-js helps us from such troublesome work. Precondition Already exist React web environment I recommend you use the react project created by create-react-app command which I wrote the before article. Atom was installed in your computer.

How to add extension to Ungoogled chromium

English 日本語 Abstract Hello everybody, It’s candle. I don’t use Google Chrome so much because I am firefox user, but sometimes I need to use Chrome for extensions. Google Chrome is slow, and there are some personal information protection is loose. Detail is here. https://github.com/Eloston/ungoogled-chromium So, I use ungoogled chromium. The problem of ungoogle chromium is that is not easy to install extensions. In this article, I’ll show you how to install plugins. This article is according to the under link. https://github.com/Eloston/ungoogled-chromium/blob/master/FAQ.md Premise Ungoogled chromium has been installed

Develop React in emacs in rjsx-mode

English 日本語 Abstract Hello everyone this is candle. In this time I would like to introduce rjsx-mode of major-mode for react development of emacs. The development of “react” has been tried and errored between emacs users, such as using web-mode or js2-jsx-mode of js2-mode. Also I had been used js2-jsx-mode before rjsx-mode. Since rjsx-mode is an extension of js2-mode, users of js2-mode can use it without discomfort. rjsx-mode has auto complete function of jsx. it’s fantastic. Precondition You use emacs You use melpa or el-get

Profile


I work in the venture company as a CTO. I start to write program in University, first I learned java, C++ and PHP. In the company, I'm developing web services by Rails. I do like to automation.

スポンサードリンク

Archives