joppot

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

ソフトウェア

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

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



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 *

関連記事

Fix emacs powerline character gets corruption(mojibake) on Mac standard terminal or iTerm2

Abstract Hello everyone it’s me candle. In this time I will show you how to fix emacs powerline character corruption(mojibake). I am referring to this site. https://griffio.github.io/utils/2016/01/26/Spacemacs-OSX-Term/ I will explain both iterm2 and mac standard terminal. In my case I launch the Emacs with iterm2, the arrow of powerline gets garbled. Let’s fix. Precondition You use emacs Your emacs was installed powerline. You use emacs with iTerm2 or mac standard terminal.

How to prevent preview from scrolling back to top in Atom’s Markdown

English 日本語 Abstract Hello everyone, it’s candle. Atom has a markdown preview function from the beginning. When markdown’s sentence becomes long, every time you edit it, the preview back to the top. And, you have to scroll every time to check. It is so tough, we will put a plug-in that will automatically adjust the preview. Premise Atom has been installed

Build PlantUML environment on Mac using brew

Abstract Hello everybody it’s me candle. In this article, I would like to build a plantUML environment which can make UML easily on Mac. I have been used starUML for making UML. plantUML seems to be much more useful than that. Precondition You already use brew. Check java version I think that java is already installed in your mac pc. PlantUML can be run with mac default java. So you launch terminal app and check the java version with the below command. java -version Probably it can be work in java version around 1.8.x . Install graphviz graphviz is a …

Construct an Atom of eslint corresponding to react + es6

Abstract Hello everyone it’s me candle. This time we will introduce Atom + eslint It is awesome easy to install it. Nowadays eslint became to be mainstream. It has become used not only in Atom but also everywhere. Precondition Node is installed Atom is Installed

Using vc to manage git on emacs25

Abstract Hello everyone it’s me candle. In this article we would like to use vc(version controll) which is included by deault in emacs. It seems that vc supports to both subversion and git, not git-specific functions. If you want to use git with emacs in earnest, I recommend magit. On the other hand, since vc is installed in by default, it is good for user who want to use it easily. Precondition You use emacs You have a basic git skill. vc-git configuration of emacs Although vc supports to git, ‘git add’ and ‘git reset HEAD’ do not exist. I …


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.