São muitos códigos para memorizar apenas para modificar um tema do WordPress. Por isso, resolvemos criar este artigo, mostrando os códigos básicos de temas para você fazer pequenas alterações ou mesmo desenvolver seu próprio tema no WordPress. Salve esta página em seus favoritos ou imprime e cole em algum lugar da sua mesa de trabalho.
Arquivos Básicos do Modelo (Template)
Abaixo segue a lista de arquivos básicos que cada tema deve ter:
- style.css
- header.php
- index.php
- sidebar.php
- footer.php
- single.php
- page.php
- comments.php
- 404.php
- functions.php
- archive.php
- searchform.php
- search.php
Códigos em Header.php
Estes códigos são geralmente encontrados em header.php, embora alguns deles possam ser vistos ao longo dos arquivos do seu modelo. Códigos como a Localização dos Arquivos do Tema são usados para chamar URLs de imagens em todo o modelo, mesmo se passa com o código da URL exata do site. Mas a maioria destes códigos são mesmo encontrados no seu arquivo header.php.
<!--?php bloginfo('name'); ?--> – título ou Nome do Blog <!--?php wp_title(); ?--> – Título de uma Página Específica <!--?php bloginfo('url'); ?--> – URL Exata do Site <!--?php bloginfo('description'); ?--> – Descrição do Site <!--?php bloginfo('template_url'); ?--> – Localização do Tema do Site <!--?php bloginfo('stylesheet_url'); ?--> – Link para o Style.css <!--?php bloginfo('rss2_url'); ?--> – URL das Feeds RSS do Site <!--?php bloginfo('pingback_url'); ?--> – URL de Pingback do Site <!--?php bloginfo('version'); ?--> – Versão do WordPress
Códigos para Outros Arquivos do Modelo
Os códigos abaixo serão vistos em todos os arquivos do modelo, como single.php, index.php, page.php e assim por diante. É realmente fácil de chamar estes códigos para tornar seu tema dinâmico quando codificá-lo.
<!--?php get_header(); ?--> – Exibe o conteúdo do arquivo Header.php <!--?php get_footer(); ?--> – Exibe o conteúdo do arquivo Footer.php <!--?php get_sidebar(); ?--> – Exibe o conteúdo do arquivo Sidebar.php <!--?php comments_template(); ?--> – Exibe o conteúdo do arquivo Comment.php <!--?php the_content(); ?--> – Exibe o conteúdo do Post <!--?php the_excerpt(); ?--> – Exibe o trecho que foi usado no Post <!--?php the_title(); ?--> – Título do Post Específico <!--?php the_permalink() ?--> – Link do Post Específico <!--?php the_category(', ') ?--> – Categoria do Post Específico <!--?php the_author(); ?--> – Autor do Post Específico <!--?php the_ID(); ?--> – ID de um Post Específico <!--?php edit_post_link(); ?--> – Editar link para um post <!--?php next_post_link(' %link ') ?--> – URL da Próxima Página <!--?php previous_post_link('%link') ?--> – URL da Página Anterior <!--?php get_links_list(); ?--> – Lista de todos os links em Blogroll <!--?php wp_list_pages(); ?--> – Lista de todas as Páginas <!--?php wp_get_archives() ?--> – Lista de Arquivo para o Site <!--?php wp_list_cats(); ?--> – Lista de todas as Categorias <!--?php get_calendar(); ?--> – Calendário <!--?php wp_register(); ?--> – Exibe o Link de registro <!--?php wp_loginout(); ?--> – Exibe o Link Login/Logout somente para Usuários Registrados
Espero que estes códigos simples e este artigo ajude você. Por favor, não esqueça de deixar um comentário abaixo e se gostou desta página compartilhe com seus amigos nas suas redes sociais. Se não quiser perdê-la de vista, adicione aos seus favoritos.
105 respostas
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
I may need your help. I’ve been doing research on gate io recently, and I’ve tried a lot of different things. Later, I read your article, and I think your way of writing has given me some innovative ideas, thank you very much.
mexican border pharmacies shipping to usa: buying prescription drugs in mexico online – mexico drug stores pharmacies
pharmacy website india http://indiaph24.store/# online shopping pharmacy india
best online pharmacy india
best online pharmacy india https://indiaph24.store/# indian pharmacies safe
indian pharmacy
buying from online mexican pharmacy [url=http://mexicoph24.life/#]cheapest mexico drugs[/url] mexican drugstore online
https://ciprofloxacin.tech/# ciprofloxacin
cytotec pills buy online [url=https://cytotec.club/#]buy cytotec[/url] cytotec pills buy online
https://finasteride.store/# order propecia without dr prescription
https://cytotec.club/# order cytotec online
order propecia for sale: generic propecia tablets – cost generic propecia without dr prescription
buy cytotec [url=https://cytotec.club/#]buy cytotec over the counter[/url] buy cytotec over the counter
https://lisinopril.network/# buy lisinopril 20 mg online united states
http://cytotec.club/# Cytotec 200mcg price
cipro online no prescription in the usa [url=http://ciprofloxacin.tech/#]cipro for sale[/url] antibiotics cipro
ciprofloxacin generic: ciprofloxacin 500mg buy online – buy cipro online without prescription
zestril lisinopril [url=https://lisinopril.network/#]buy lisinopril 20 mg online united states[/url] lisinopril 20 mg price online
http://lisinopril.network/# lisinopril hct
http://cytotec.club/# Misoprostol 200 mg buy online
order cytotec online: Misoprostol 200 mg buy online – buy cytotec in usa
cost of cheap propecia without dr prescription [url=http://finasteride.store/#]generic propecia tablets[/url] cost of cheap propecia prices
http://cytotec.club/# purchase cytotec
effexor and tamoxifen [url=https://nolvadex.life/#]tamoxifen cost[/url] tamoxifen therapy
http://lisinopril.network/# lisinopril mexico
buy misoprostol over the counter [url=http://cytotec.club/#]cytotec buy online usa[/url] buy cytotec
purchase cipro: cipro generic – ciprofloxacin generic price
https://cytotec.club/# п»їcytotec pills online
cost propecia prices [url=http://finasteride.store/#]cost of cheap propecia[/url] cost cheap propecia without insurance
cost propecia for sale: buy propecia prices – cost generic propecia price
https://finasteride.store/# get cheap propecia without insurance
http://nolvadex.life/# nolvadex 20mg
cipro [url=http://ciprofloxacin.tech/#]cipro ciprofloxacin[/url] ciprofloxacin order online
https://finasteride.store/# cost cheap propecia without dr prescription
lisinopril 10 mg best price [url=https://lisinopril.network/#]lisinopril cheap price[/url] lisinopril 5mg
buy cipro online: purchase cipro – ciprofloxacin generic
buy 40 mg lisinopril [url=https://lisinopril.network/#]lisinopril 10 mg over the counter[/url] lisinopril cost us
https://ciprofloxacin.tech/# purchase cipro
cost cheap propecia without insurance: cost propecia tablets – buy generic propecia
http://lisinopril.network/# lisinopril diuretic
buy propecia without dr prescription [url=https://finasteride.store/#]order propecia[/url] cost of propecia online
http://finasteride.store/# buying cheap propecia without dr prescription
lisinopril generic: cost of lisinopril 40 mg – zestril tab 10mg
https://ciprofloxacin.tech/# ciprofloxacin 500 mg tablet price
cost cheap propecia without dr prescription [url=https://finasteride.store/#]order cheap propecia[/url] cost of propecia online
buy cipro [url=https://ciprofloxacin.tech/#]cipro 500mg best prices[/url] buy cipro online canada
https://finasteride.store/# order generic propecia pill
cipro online no prescription in the usa: buy cipro – ciprofloxacin generic
order cheap lisinopril [url=http://lisinopril.network/#]lisinopril price comparison[/url] lisinopril 40 mg purchase
http://ciprofloxacin.tech/# п»їcipro generic
http://lisinopril.network/# lisinopril 5 mg price in india
buy cytotec in usa [url=https://cytotec.club/#]purchase cytotec[/url] Cytotec 200mcg price
how does tamoxifen work: how to lose weight on tamoxifen – pct nolvadex
https://cytotec.club/# buy cytotec over the counter
buy propecia for sale [url=https://finasteride.store/#]cheap propecia pill[/url] get generic propecia pill
https://nolvadex.life/# cost of tamoxifen
generic propecia no prescription [url=http://finasteride.store/#]buying cheap propecia online[/url] buy cheap propecia for sale
Levitra generic best price: Vardenafil online prescription – Buy Levitra 20mg online
https://viagras.online/# Viagra online price
https://levitrav.store/# Buy Vardenafil 20mg
Vardenafil price [url=https://levitrav.store/#]buy Levitra over the counter[/url] Buy generic Levitra online
Cenforce 150 mg online: Cenforce 150 mg online – Cenforce 100mg tablets for sale
Cialis without a doctor prescription [url=https://cialist.pro/#]Cialis 20mg price in USA[/url] Cialis 20mg price
https://cialist.pro/# Buy Cialis online
Generic Tadalafil 20mg price: Cialis 20mg price in USA – Cheap Cialis
Generic Viagra online: Buy generic 100mg Viagra online – generic sildenafil
Cheap generic Viagra online [url=http://viagras.online/#]Buy Viagra online cheap[/url] Viagra tablet online
http://cenforce.pro/# cenforce for sale
cheapest cialis: Generic Tadalafil 20mg price – cialis for sale
http://cenforce.pro/# order cenforce
Levitra 20 mg for sale [url=http://levitrav.store/#]Levitra generic price[/url] Levitra generic best price
http://kamagra.win/# buy Kamagra
Buy Tadalafil 20mg: Generic Tadalafil 20mg price – Buy Tadalafil 10mg
Viagra tablet online [url=http://viagras.online/#]Buy Viagra online[/url] Cheap Viagra 100mg
Buy Tadalafil 10mg: buy cialis online – cheapest cialis
http://cenforce.pro/# cenforce for sale
Viagra tablet online: Buy Viagra online cheap – Cheap generic Viagra
sildenafil oral jelly 100mg kamagra [url=http://kamagra.win/#]kamagra pills[/url] Kamagra 100mg price
http://pharmmexico.online/# mexican mail order pharmacies
promo code for canadian pharmacy meds: pharm world – online pharmacy no prescription
https://pharmmexico.online/# medication from mexico pharmacy
canadian pharmacy world coupons [url=http://pharmworld.store/#]online pharmacy[/url] no prescription pharmacy paypal
overseas online pharmacy-no prescription: no prescription needed pharmacy – online pharmacy not requiring prescription
no prescription online pharmacies [url=http://pharmnoprescription.icu/#]buying online prescription drugs[/url] order prescription from canada
http://pharmindia.online/# best online pharmacy india
northern pharmacy canada: best canadian pharmacy – canadian pharmacy 24
purple pharmacy mexico price list: mexican rx online – buying prescription drugs in mexico online
india pharmacy mail order [url=http://pharmindia.online/#]india pharmacy mail order[/url] indian pharmacy online
https://pharmmexico.online/# best online pharmacies in mexico
mexico pharmacy: mexico pharmacies prescription drugs – mexican pharmacy
online pharmacies without prescription: canada mail order prescription – mexican pharmacy no prescription
canada pharmacy not requiring prescription [url=http://pharmworld.store/#]online pharmacy[/url] buying prescription drugs from canada
https://pharmworld.store/# online pharmacy discount code
legit canadian pharmacy online: canadian neighbor pharmacy – best rated canadian pharmacy
buying prescription drugs from canada online: canada drugs no prescription – no prescription online pharmacy
canadian drugs online [url=http://pharmcanada.shop/#]canadian drug pharmacy[/url] online pharmacy canada
https://pharmindia.online/# buy medicines online in india
http://pharmcanada.shop/# canada drugs
best online pharmacy no prescription: prescription canada – quality prescription drugs canada
mexico pharmacies prescription drugs [url=http://pharmmexico.online/#]mexican online pharmacies prescription drugs[/url] mexican pharmaceuticals online
https://pharmworld.store/# cheapest pharmacy to fill prescriptions without insurance
reputable indian online pharmacy: indian pharmacies safe – buy medicines online in india
amoxicillin 775 mg: buy amoxicillin 500mg – amoxicillin 500 tablet
doxycycline generic: doxycycline generic – generic doxycycline
buy zithromax online with mastercard [url=http://zithromaxa.store/#]buy zithromax without prescription online[/url] order zithromax over the counter
buy zithromax online australia: zithromax 500 mg lowest price drugstore online – zithromax over the counter uk
https://zithromaxa.store/# zithromax price canada
neurontin capsules 300mg [url=https://gabapentinneurontin.pro/#]neurontin 1000 mg[/url] neurontin uk
zithromax over the counter: where can i buy zithromax capsules – zithromax over the counter uk
amoxicillin price canada: buy amoxicillin online uk – amoxicillin no prescription
online doxycycline: doxy – generic for doxycycline