• I want to pass a query string parameter to the_content().

    I have done this for a regular link like <?php the_permalink() ?>?var=7 but I have no idea how to do it with the_content.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Wouldn’t you have to use something like $my_content=get_the_content() and then formulate a link with that value and your additional parameters?

    Thread Starter bh

    (@bh)

    Thanks for your reply.

    $my_content ends up still showing the constructed A tag, so I am missing how I can formulate a new link?

    Not sure this is what you are asking:

    <?php $my_content=get_the_content();?>
      <li><a href="<?php echo $my_content. '?var=7'; ?>"><?php
    echo $my_content; ?></a></li>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Append query string to the_content()’ is closed to new replies.