Home Code X DOCUMENTARY Knowledge and mystery How to display images and content out of WordPress theme?
How to display images and content out of WordPress theme?
Many new friends working with WordPress will not know how to display the data in WordPress theme.
There are many ways to display the data segment.
- Use plugins to display data as you like. (You can see how the plugins are displayed according to the instructions).
- Use programming code:
PHP is the main language of WordPress. You use how to set up HTML, CSS structured data …
Example: Display image
Display Title:
Show text:
In the function file, there must be the following code:
// Content Limit
function the_content_limit ($ max_char, $ more_link_text = ‘(more …)’, $ stripteaser = 0, $ more_file = ”) {
$ content = get_the_content ($ more_link_text, $ stripteaser, $ more_file);
$ content = apply_filters (‘the_content’, $ content); $ content = str_replace (‘]]>’, ‘]]>’, $ content);
$ content = strip_tags ($ content);
if (strlen ($ _ GET [”])> 0) {
echo “”; echo $ content; echo “”. “”; echo “”;
}
else if ((strlen ($ content)> $ max_char) && ($ espacio = strpos ($ content, “”, $ max_char))) {
$ content = substr ($ content, 0, $ espacio); $ content = $ content; echo “”;
echo $ content;
echo “…”;
echo “”. $ more_link_text. “
“; echo” “;
} else {
echo “”; echo $ content; echo “
“.” ..
“; echo” “;
}}
Show Tags:
…
You can use the While loop structure.
For example:
Good luck.
Giới thiệu tập đoàn cự trình thành phố Thẩm Quyến Trung Quốc
History of mobile phone technology development
Star Aniseed in Vietnam
Taiwan Republic
Introduction Corn Noodles of Lang Son Province of Vietnam
Republic of Russia
Solution for wholesale distribution
Major e-commerce channels in Vietnam
Dong Dang Lang Son border gate during the period when Vietnam first opened trade with other countries. Lang Son Vietnam in 1991
History of industrial revolutions
What is Decal PP?
Introduction for Hoang Ngoc Chanel Youtube
INTRODUCTION VIETNAM’S DRY CHILI PRODUCTS
Thomas More
Introduce the products of Alekima Dos COM
Vietnam – Chile FTA signed
INTERFACE WordPress SEO news website, beautiful
Thomas Alva Edison
Monroe Doctrine
New World concept
Featured articles
Manga Drawing art with Alekima
JUCHENGMO Summary of Vietwater exhibition 2019
What is Awesome Font? How to use Font Awesome
TECHNICAL SPECIFICATIONS OF TOTA QM50 CO PE FILM WINDING MACHINE
CHAM VIETNAM’s Services Introduction
WordPress news health news, health, clinic …
Introduction for Hoang Ngoc Chanel Youtube
NEW
What is HTML5? Superior web design and development with HTML5
Producing and creating entertainment games
Introduction Canonical shipper game