3

enter image description hereI have just created sublime text snippet for PHP Wordpress loop. But it's not triggering while I was pressing tab.

<snippet>
    <content><![CDATA[
 if(have_posts()): ?>
    <?php while(have_posts()): ?>
        <?php the_post(); ?>
        <?php the_title(); ?>
    <?php endwhile; ?>
<?php endif; ?>
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <!-- <tabTrigger>wp_loop</tabTrigger> -->
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>source.php</scope>
</snippet>

1 Answer 1

4

Remove commented line of tabTrigger

<snippet>
    <content><![CDATA[
 if(have_posts()): ?>
    <?php while(have_posts()): ?>
        <?php the_post(); ?>
        <?php the_title(); ?>
    <?php endwhile; ?>
<?php endif; ?>
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>wp_loop</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>source.php</scope>
</snippet>
Sign up to request clarification or add additional context in comments.

4 Comments

can you post screen shot of your current working file?
Ok I just add screen shot of my php file
please add <?php open tag and then try.
God dang, I feel like a goof for not thinking of uncommenting it. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.