R
R
Rasul Gitinov2015-11-29 10:43:50
WordPress
Rasul Gitinov, 2015-11-29 10:43:50

How to create a module (block template) for WordPress? so that it can then be called at the desired point on the page?

I can not find information on this topic, so I hope to get an answer here.
I want to create a module, for example, a left column in a three-column template (just like a Toaster) . At the moment, I brought it out through the get_sidebar () method; , but I need it for the right block where the ad will be placed. Therefore, for the left column, I need to create my own module, but I don’t know how exactly to do it, so that later I can display it as get_left_block(); .
I tried my best to describe the situation, I hope it helps.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2015-11-29
@raselgit

You create a template for this left block in your theme folder:
left-block.php
Connect the output of your block like this:
<?php get_template_part( 'left-block' ) ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question