What should I see if I want to create a form that searches through custom post types, i.e. a complete Form made from? There is no problem with the creation of the real form and its elements, but in the next step, many difficult questions arise, such as $ _ GET to retain permalinks of WordPress to retain data from another file?
How can I take action on posts if I can not make my pyramid of statements and use my core functions of WordPress?
Try looking at the code below and make it your version Keep the file in functions.php It should work perfectly. You may have to change 'with apostrophes' and more.
add_action ('init', 'product_register'); Function product_register () {$ args = array ('label' = & gt; __ ('product'), 'singular_label' = & gt; __ ('product'), 'public' = & gt; true, 'show_ui' = & Gt; true, 'support' => array ('title', 'editor', 'thumbnail')) ;; True, 'ability_type' = & gt; 'Post', 'hierarchical' = & gt; Wrong, 'rewrite' = & gt; Register_post_type ('product', $ args); } Add_action ("admin_init", "admin_init"); Add_action ('save_post', 'save_price'); Function admin_init () {add_meta_box ("prodInfo - meta", "product option", "meta_epayment", "product", "side", "less"); } Function meta_options () {global $ post; $ Custom = get_post_custom ($ post -> ID); $ Value = $ custom ["value"] [0]; Echo & lt; Label & gt; Price: & lt; / Labels & gt; & Lt; Input type = "article" name = "value" value = "'$ value." / /;';}; Function save_price () {global $ post; update_post_meta ($ post -> ID, "price", $ _POST ["value"]); = "gtc: mediawiki-xid =" gtc: mediawiki-xid = "gtc: suffix =" "rewrite" = & gt; true));
Comments
Post a Comment