0

I want to make related articles based on the categories in the sidebar using shortcodes so that they can be placed anywhere. can you help me? thanks before.

1

The best way to add the shortcode is to create a shortcode in your child theme functiuons.php file.

function footag_func( $atts ) {            //Example
    return "foo = {$atts['foo']}";
}
add_shortcode( 'footag', 'footag_func' );

You can refer to this document for WordPress shortcodes detail

https://codex.wordpress.org/Function_Reference/add_shortcode

1
  • how do you make related articles by category? – Renomu Reza Jan 21 '19 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.