Title: pultz's Replies | WordPress.org

---

# pultz

  [  ](https://wordpress.org/support/users/pultz/)

 *   [Profile](https://wordpress.org/support/users/pultz/)
 *   [Topics Started](https://wordpress.org/support/users/pultz/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pultz/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pultz/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pultz/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pultz/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pultz/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/pultz/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/pultz/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Store Locator] Some countries does not work](https://wordpress.org/support/topic/some-countries-does-not-work/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/some-countries-does-not-work/#post-11043361)
 * was a error about it not being able to show more then 100
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/page/2/#post-7244792)
 * Thanks so much for the help [@rajanit2000](https://wordpress.org/support/users/rajanit2000/),
   if anyone need help ask him.
 * Here is the result that made it work for me.
 * my function.php code:
 *     ```
       add_action( 'admin_init', 'my_admin_portfolio' );
       function my_admin_portfolio() {
           add_meta_box( 'portfolio_meta_box', 'Programs used', 'display_portfolio_meta_box','Portfolio', 'normal', 'high' );
       }
       function display_portfolio_meta_box( $portfolio ) {
           ?>
           <h4>2D Programs</h4>
           <table width="100%">
           <tr>
               <td style="width: 25%">Photoshop</td>
               <td><input type="checkbox" style="width:425px;" name="meta[Photoshop]" value="True" <?php if( get_post_meta( $portfolio->ID, 'Photoshop', true ) == "True" ) {?>checked<?php }?> />
               </td>
           </tr>
           <tr>
               <td style="width: 25%">Illustrator</td>
               <td><input type="checkbox" style="width:425px;" name="meta[Illustrator]" value="True" <?php if( get_post_meta( $portfolio->ID, 'Illustrator', true ) == "True" ) {?>checked<?php }?> />
               </td>
           </tr>
   
       </table>
       <?php
       }
       add_action( 'save_post', 'add_portfolio_fields', 10, 2 );
       function add_portfolio_fields( $portfolio_id, $portfolio ) {
           if ( $portfolio->post_type == 'portfolio' ) {
                if (  $_POST['meta']['Photoshop'] == "True" ) {
                   update_post_meta( $portfolio_id, 'Photoshop', 'True' );
               }else{
       			update_post_meta( $portfolio_id, 'Photoshop', 'False' );
       		}
           }
       }
       ```
   
 * this is my single.php code (where i print it):
 *     ```
       <?php
       			if (get_post_meta(get_the_ID(), 'Photoshop', 'Illustrator', 'Maya', 'zbrush', 'sDesigner', 'After', 'Premiere', 'Nuke') == null) {
       				echo "<div class='nosoftware'><h3>No software has been picked!</h3></div>";
       			}
       			else
       			{
   
       			if (get_post_meta( get_the_ID(), 'Photoshop', true ) == "True")
       			{
       				echo "<div class='software'><img src='"; ?><?php bloginfo('template_directory'); ?><?php echo "/img/logos/Photoshop.png' /><h3>Photoshop</h3></div>";
   
       			}
   
       			if (get_post_meta(get_the_ID(), 'Illustrator', true) == "True")
       			{
       				echo "<div class='software'><img src='"; ?><?php bloginfo('template_directory'); ?><?php echo "/img/logos/ill.png' /><h3>Illustrator</h3></div>";
   
       			}
       }
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/page/2/#post-7244659)
 * [@anevins](https://wordpress.org/support/users/anevins/) just so you know. but
   even though you redacted the mail i still got it in my mail 🙂 so is that something
   the forum should look into maybe?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/page/2/#post-7244657)
 * here is the link til my function file
 * [Function file](http://www.filedropper.com/functions)
 * and the link til my single file
 * [single file](http://www.filedropper.com/single)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/page/2/#post-7244651)
 * well that kinda worked i can see on my front end that it change to false but 
   the dropdown still puts it on true even when its false.
 * and really want it to be a checkbox if you have a way to things this problem 
   for the checkbox 🙂
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/page/2/#post-7244646)
 * thanks it’s almost there the only problem i have left now is i can’t uncheck 
   and update it. then it will always remember that it was checked ad stay checked.
 * what am i doing wrong there?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244634)
 * here is the function as said i made it work now i just need to be able to have
   more then one and get the checked vale on my single.php
 * [Paste bin](http://pastebin.com/fTNei0gV)
 * this is my single.php code
 *     ```
       <?php 
   
       		if (have_posts() ):
   
       			while(have_posts() ) : the_post(); ?>
   
       		<h3><?php the_title(); ?></h3>
       		<p><?php the_content(); ?></p>
       		<?php echo get_post_meta( get_the_ID(), 'check_1', true );?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244631)
 * i fixed it my bad. now i just need a way to make the if statment on my single.
   php
 * like
    if(check_1 == checked) do something else dont do it.
 * do you have anything?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244629)
 * the issue is that when i check the box and then press update. it’s unchecked 
   again
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244622)
 * first think i still cant get it to save on my admin page. if i update the product
   after checking it it goes back to not checked.
 * 2nd i dont get the <?php echo get_post_meta( get_the_ID(), ‘check_1’, true );?
   >
 * could you maybe make it in to an if
 * like
 * if(check_1 == checked)
    do something else dont do it.
 * something like that?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244574)
 * LoL my bad. but now i have the problem i had a long time ago.
 * when i update my item it wont stay checked so guess there’s something in the 
   save option that needs to be change?
 * and can you send me some code that so i can print it out on the front page?
 * if its check i want to be able to do something els do nothing like that?
 * i appreciate all your help.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244559)
 * think there is something wrong with this line
 * `<input type="checkbox" style="width:425px;" name="meta[check_1]" value="True"
   <?php if( get_post_meta( $car->ID, 'check_1', true ) == "True" ) {?>checked<?
   php}?> />`
 * it give me an error that says
 * unexpected end of file
 * and tried it out it something abou the {?>checked<?php}?> that does not work
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244549)
 * i tryed your code and it gives me text fields and text fields are not my problem,
   its that i need it to be check boxes and how to see if its true or false on my
   single.php page.
 * here is what i get with your code.
 * [Picture of it](http://imgur.com/VP4TBZT)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom Meta Box Checkbox not printing](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/custom-meta-box-checkbox-not-printing/#post-7244548)
 * i might have forgotten to say that my code is my function.php file. but gonna
   try that code
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Polylang removes my wrapper when i switch language](https://wordpress.org/support/topic/polylang-removes-my-wrapper-when-i-switch-language/)
 *  Thread Starter [pultz](https://wordpress.org/support/users/pultz/)
 * (@pultz)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/polylang-removes-my-wrapper-when-i-switch-language/#post-7152801)
 * i solved it my self

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/pultz/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/pultz/replies/page/2/?output_format=md)