Hi @appliedarts
Posts mean Archives , Categories ?
How to add your custom content on Arichves.
1. Showing Your Archives page ( category )
2. Click Adminbar Customize
3. Select Advanced
4. Set show. in Section ‘Developer Setting’
You will find several gray background blocks on the preview screen like below
add_action( ‘raindrops_prepend_loop’, ‘your_function’ ) or add template part file the name ‘hook-prepend-loop.php’.
Once you copy the block in your favorite place
5. Set hide. in Section ‘Developer Setting’
You are now ready for customization.
You can use action hook
functions.php
<?php
add_action('raindrops_prepend_loop','my_raindrops_prepend_loop');
function my_raindrops_prepend_loop(){
if ( is_category() ) {
echo 'Hello World';
}
}
?>
or create template file raindrops( or child theme dir ) / hook-prepend-loop.php
<?php
if ( is_category() ) {
echo 'Hello World';
}
}
?>
Thank you.
-
This reply was modified 7 years, 11 months ago by nobita.