• Hi, I’m new to wordpress know how to help me? In the following code:

    <?php  
    
    // get warp
    $warp = Warp::getInstance();  
    
    // load main template file, located in /layouts/category.php
    echo $warp['template']->render('category-ID');

    I would like to dynamically insert id category in 'category-ID'

    This code is in the file category.php

Viewing 4 replies - 1 through 4 (of 4 total)
  • get_queried_object_id() should work on that template.

    Thread Starter ZanchettaSol

    (@zanchettasol)

    Great that active community, already answered. thanks csloisel. I can take advantage of your help by asking you to fill in the code that I entered? The biggest challenge for me is to enter the id after category-

    P.S. Forgive my English translated with google;)

    <?php  
    
    // get warp
    $warp = Warp::getInstance();  
    
    // load main template file, located in /layouts/category.php
    echo $warp['template']->render('category-'.get_queried_object_id());
    Thread Starter ZanchettaSol

    (@zanchettasol)

    Does not work, the ide must stay within the apexes
    echo $warp['template']->render('category-.get_queried_object_id());');

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to insert the id category in this code?’ is closed to new replies.