WordPress page content in Modal Pop-Up -


i working on wordpress gallery website has 3 pages: home, gallery, , bio (http://adamgreener.com/).

when click bio, bio content pops up, powered easy modal plugin (the content manually typed in html in plugin settings).

i have exact same html content in wordpress page (which mobile viewers see, rather popup).

the page simple edit, modal content not friendly average user. seeking way can allow user edit bio page, , have modal content update @ same time.

what best route such action?

thanks in advance!

you use get_page page content, , shortcode display in popup. in functions.php file of wordpress theme, e.g.:

add_action( 'init', 'greener_shortcode_init', 11 ); function greener_shortcode_init() {     add_shortcode( 'greener_bio', 'greener_bio_shortcode' ); }  function greener_bio_shortcode( $atts ) {     $page_id = 123; // id of bio page     $page_data = get_page( $page_id );     $return = '';     $return .= '<h2>' . $page_data->post_title . '</h2>';     $return .= $page_data->post_content;     return $return; } 

then, in modal, use shortcode:

[greener_bio]


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -