• Hello

    I´m trying to add som shortcode, but all i gett is the text:
    [toggle title=”This is title”]Your Content…[/toggle]

    What do i need to do….

    Please help me…..

Viewing 15 replies - 1 through 15 (of 20 total)
  • http://codex.wordpress.org/Forum_Welcome#Include_as_much_information_as_possible

    is that in a template or in the content of a page?

    are you using a plugin for the shortcode, or is that from your theme?

    what theme are you using?

    Thread Starter volvo_owmer

    (@volvo_owmer)

    This is of a content of a page…
    I´m not using a plugin.

    where are you adding this shortcode from wp-admin page editor. or is it a page (.php) in your theme folder? make sure the shortcode exits, if yes you are not using it right.

    Thread Starter volvo_owmer

    (@volvo_owmer)

    I´m adding the code in wp-admin page editor.

    make sure the shortcode exits

    How do i do that…

    the shortcode you are using if its coming from the theme then they should also provide example use of it. usually its the way you did on your first post but use of parameters may differ

    or if you cant see any example, you may also look inside the function of that shortcode, there can be an example of uses commented at the function definition (may be common practice..)

    Thread Starter volvo_owmer

    (@volvo_owmer)

    Can you help me?

    I think in my first design I use a code in function to use shortcode.
    But i can remember how i did it.

    if you cant find the place where the code is then you can search the text: “toggle” on theme dir. the file usually called: shortcodes.php or bit far functions.php or custom_functions.php.

    and the wp function that executes the call “do_shortcode”

    Thread Starter volvo_owmer

    (@volvo_owmer)

    I test do_shortcode like this:
    <?php echo do_shortcode('[toggle title="This is title"]Your Content…[/toggle]'); ?>

    I the page I can se :

    <!--
    ?php echo do_shortcode('[toggle title="This is title"]Your Content…[/toggle]'); ?
    -->

    I cant find anything on the theme dir like (toggle)

    I past the : add_filter( ‘the_content’, ‘do_shortcode’ );
    in to the function.php, nothing works….

    Thread Starter volvo_owmer

    (@volvo_owmer)

    I test with this one:

    shortcode: [bar]

    Code:

    function bar_demo( $atts ){
     return "This is a demo for wordpress shortcut.";
    }
    // add to the post
    add_shortcode( 'bar', 'bar_demo' );
    
    // add to the excerpts
    add_filter('the_excerpt', 'do_shortcode');

    And i get this:
    This is a demo for wordpress shortcut.

    So i now that is working…

    check with this http://codex.wordpress.org/Function_Reference/do_shortcode. are you writing your own shortcode? or the shortcode already exists within the theme?

    Thread Starter volvo_owmer

    (@volvo_owmer)

    I have check this many times, but i dont understand it.
    I´m not writing my own shortcode, the shortcode is to the themes….

    What theme?

    Thread Starter volvo_owmer

    (@volvo_owmer)

    sheeva themes….

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Use shortcode in content pages’ is closed to new replies.