• Resolved ksgboy22

    (@ksgboy22)


    Hello

    How can i add wp all import csv value to shortcode based in post template?

    [shortcode filter=”{miasta[1]}”]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @ksgboy22

    Utilizing WP All Import’s custom PHP function feature would be one way to accomplish this.

    Place the code below into the Function Editor mentioned above.
    Replace [su_highlight] and [\su_highlight] with your desired shortcode’s requirements.

    <?php
    function enclose_in_shortcode( $text = null) {
    return "[su_highlight]" . $text . "[/su_highlight]"; 
    }

    Then, in the field where you’d like to place the shortcode, put this:
    [enclose_in_shortcode({miasta[1]})]

    Hope this helped out!

    Plugin Author WP All Import

    (@wpallimport)

    Hey @ksgboy22,

    The way you’re doing it is correct, you just need to escape the opening square bracket with a backslash, like this:

    \[shortcode filter="{miasta[1]}"]

    Plugin Author WP All Import

    (@wpallimport)

    Hey @ksgboy22,

    I’m marking this as resolved since it’s been inactive for a while. Feel free to open a new topic if you still have questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add value {city[1]} to shortcode in post’ is closed to new replies.