how do i add customizer edit option without plugin in wp

when i go to wp customizer then i want edit the name popular and cat_id =21


div class="p_list"h2spanpopular/span/h2   
    ?php $first = true; ? ?php $cat_id = 21;
$latest_cat_post = new WP_Query( array('posts_per_page' = 4, 'category__in' = array($cat_id)));
if( $latest_cat_post-have_posts() ) : while( $latest_cat_post-have_posts() ) : $latest_cat_post-the_post();  ?  

Topic codex Wordpress

Category Web


The customizer, as it is mostly for style settings.

If you want to make a heading dynamic then you could create a custom field. Then echo that into the page or post template using the get_post_meta function, and wrap it in whatever HTML tags you wish.

Hope this helps!

check these out:

https://wordpress.org/support/article/custom-fields/

https://wordpress.org/support/article/custom-fields/#displaying-custom-fields

Or you could try these plugins:

https://wordpress.org/plugins/meta-box/

https://wordpress.org/plugins/advanced-custom-fields/

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.