• Hey Everyone,
    I’m trying to set up a site so that I can call pages from the text editor in the backend. Much like we use the template calls to get pages in HTML.

    I’m not sure how to define or create my own short codes to use in the text editor, but I would like to be able to use a shortcode to execute a function from my functions.php file.

    here is the function for including a page

    /* Get_Somepage */
    function get_somepage( $name = null ) {
     do_action( 'get_somepage', $name );
    
     $templates = array();
     if ( isset($name) )
      $templates[] = "somepage-{$name}.php";
    
     $templates[] = 'somepage.php';
    }

    How can I incorporate the defination of a shortcode into this?
    Is this even possible?

    Thanks in advance for any support or ideas.

  • The topic ‘Call page from text editor?’ is closed to new replies.