ok what am i missing here ... (2 posts)

  1. firstgamtrader
    Posted 5 years ago #

    i see all these wonderful examples in the docs. but where in the world does one actually put any of this 'code' ????

    for example :
    this is right out of the docs for shortcodes ...

    // [bartag foo="foo-value"]
    function bartag_func( $atts ) {
    	extract( shortcode_atts( array(
    		'foo' => 'something',
    		'bar' => 'something else',
    	), $atts ) );
    	return "foo = {$foo}";
    add_shortcode( 'bartag', 'bartag_func' );

    if i were to implement the above code, WHERE WOULD IT GO???
    there many fine examples of how to use the API but where in the world do you actually put any of this php code ????

  2. Michael
    Forum Moderator
    Posted 5 years ago #

    that code goes into functions.php of your theme.

Topic Closed

This topic has been closed to new replies.

About this Topic