• First of all: THANK YOU for the plugin

    Is it possible to assign a shortcode to some snippets so we can integrate them into the webpagetext ?
    For example I would like to display “Last update of the page: …..” or show the same text on several pages but change the content a bit by reading custom variables.

    Thank you in advance

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    It definitely is possible.

    You’ll need to write some code to wrap around the HTML/PHP content of the shortcode:

    add_shortcode( 'shortcode_name', function ( $atts, $content = '') { ?>
    
        // shortcode content goes here
    
    <?php } );

    You can access any content between the shortcode tags or attributes passed to the shortcode using the respective $content and $atts variables.

    My apologies for taking so long to answer this. Please let me know if there’s any other way I can help out!

Viewing 1 replies (of 1 total)

The topic ‘Shortcode’ is closed to new replies.