• What I would like to do is to use a WordPress tag inside a php but not with its proper call. For instance:

    We have the tag the_ID, that works trough <?php the_ID();>

    But I would like to do something like:

    <?php $myvariable = the_ID();>

    But with that code, I got the retrieved the_ID printed on the screen, not saved into $myvariable. And I can not avoid that commonly using <?php the_ID();> because I can not pass a php inside another php.

    Any help??

  • The topic ‘Insert WP tags indirectly inside php’ is closed to new replies.