Title: FriendlyHal's Replies | WordPress.org

---

# FriendlyHal

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adjustable shortcode parameter](https://wordpress.org/support/topic/adjustable-shortcode-parameter/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adjustable-shortcode-parameter/#post-6353144)
 * Asked again and found some help
 * [link](https://wordpress.org/support/topic/possible-to-randomize-shortcode-parameter?replies=8)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Where to add code to customize a plug-in #easy](https://wordpress.org/support/topic/where-to-add-code-to-customize-a-plug-in-easy/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/where-to-add-code-to-customize-a-plug-in-easy/#post-6363346)
 * Asked again and found some help
 * [link](https://wordpress.org/support/topic/adjusting-php-files?replies=9#post-7225297)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Easy Popup Announcement] Adjusting the default css](https://wordpress.org/support/topic/adjusting-the-default-css/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adjusting-the-default-css/#post-6364698)
 * Found help in another forum
 * [link](https://wordpress.org/support/topic/adjusting-php-files?replies=9#post-7225297)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adjusting .php files](https://wordpress.org/support/topic/adjusting-php-files/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adjusting-php-files/#post-6367843)
 * Woohoo! Thank you so very much! I realize now I was making that waaay more complicated
   than it needed to be, haha.
 * Thank you again, you are a virtuoso!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adjusting .php files](https://wordpress.org/support/topic/adjusting-php-files/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adjusting-php-files/#post-6367835)
 * All right, I think I got this 😛
    Hopefully I will tick this thread as resolved
   here shortly.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adjusting .php files](https://wordpress.org/support/topic/adjusting-php-files/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adjusting-php-files/#post-6367832)
 * So literally just put `$epa_html .= '<p> See? </p>';` for the line and then download
   a Custom CSS plugin? If so any recommendations for such a plugin?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Adjusting .php files](https://wordpress.org/support/topic/adjusting-php-files/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/adjusting-php-files/#post-6367828)
 * First off, thank you for the extremely quick reply. Secondly, I apologize for
   my ignorance. I’ve tried 20+ different ways to enter “my formatting code” in 
   the line you have pointed out to me as well as trying some different things with
   the content itself but none of them seem to work. Looking at the source code 
   for the page, none of “my formatting code” seems to be going through. Here are
   just a few of the ways I’ve tried to give you a sense of what I may be doing 
   wrong.
 *     ```
       $epa_html .= '<p> <html>
       <head>
       <style type="text/css">
       p {
       ...
           color: #000000
       }
       </style>
       </head></p>';
       ```
   
 *     ```
       $epa_html .= '<html>
       <head>
       <style type="text/css">
       p {
       ...
           color: #000000
       }
       </style>
       </head>';
       ```
   
 *     ```
       $epa_html .= '<style type="text/css">
       p {
       ...
           color: #000000
       }
       </style>';
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Ads on my website](https://wordpress.org/support/topic/ads-on-my-website-1/)
 *  [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/ads-on-my-website-1/#post-6363097)
 * Sorry, I missed the link. Definitely looks like your host added in some default
   code to generate that.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Ads on my website](https://wordpress.org/support/topic/ads-on-my-website-1/)
 *  [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/ads-on-my-website-1/#post-6363095)
 * It might also be a plug-in you have downloaded. Can you give us any info about
   the ads themselves? A lot of times it says who generated the ad on the ad itself.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Possible to randomize shortcode parameter?](https://wordpress.org/support/topic/possible-to-randomize-shortcode-parameter/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/possible-to-randomize-shortcode-parameter/#post-6353988)
 * Wooohooo!!!! You did it 😀 If Apple hadn’t made such a mockery of the word genius
   I would call you one, in lieu, you are a virtuoso!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Possible to randomize shortcode parameter?](https://wordpress.org/support/topic/possible-to-randomize-shortcode-parameter/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/possible-to-randomize-shortcode-parameter/#post-6353984)
 * It doesn’t seem to work in my case anyway :/
 * The plug-in is easy popup announcement, the code for the shortcode is thus:
 *     ```
       <?php
   
       /*
        * Shortocode for single post / page
        */
       function epa_setcookie_post() {
       	$epa_expire = get_option( 'epa_expire' );
       	$expire = time() + (float) $epa_expire;
       	if(isset($_COOKIE['epa_popup'])):
       	else:
       		//$_COOKIE['epa_popup'] = 'active';
       		setcookie('epa_popup', 'active', $expire);
       	endif;
       } 
   
       function epa_shortcode_single( $atts ) {
       	$atts = shortcode_atts( array(
        	      'id' => ''
             ), $atts );
   
       	$default_popup = get_post($atts['id']);
   
       	if(get_option('epa_enable') == 'no') :
   
       		$epa_html .= '<div id="my_popup" class="well"><span class="my_popup_close"></span>';
       		$epa_html .= $default_popup->post_content;
       		$epa_html .= '</div>';
   
       		if(!isset($_COOKIE['epa_popup'])) {
       			return $epa_html;
       		}
   
       	endif;
   
       }
       add_shortcode( 'epapop', 'epa_shortcode_single' );
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Possible to randomize shortcode parameter?](https://wordpress.org/support/topic/possible-to-randomize-shortcode-parameter/)
 *  Thread Starter [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/possible-to-randomize-shortcode-parameter/#post-6353954)
 * Thank you for responding 🙂
 * As I’m editing the page I can write `[shortcode id = '123']` and it causes a 
   modal popup with the “id” of ‘123’ to appear on the page. If I code `[shortcode
   id = '128']` then instead of popup ‘123’ up comes ‘128’. What I would like to
   happen is that a random popup appears instead of just the same ‘123’ or ‘128’
   popup over and over.
 * Putting `[shortcode id = 'rand("120","130")']` doesn’t fly.
 * Can this only be done by editing the plugins code?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Draft and media updates lost](https://wordpress.org/support/topic/draft-and-media-updates-lost/)
 *  [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/draft-and-media-updates-lost/#post-6352994)
 * You’re welcome, glad to help.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Draft and media updates lost](https://wordpress.org/support/topic/draft-and-media-updates-lost/)
 *  [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/draft-and-media-updates-lost/#post-6352966)
 * Haha, glad you figured it out 🙂
    Don’t forget to mark as resolved
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Draft and media updates lost](https://wordpress.org/support/topic/draft-and-media-updates-lost/)
 *  [FriendlyHal](https://wordpress.org/support/users/friendlyhal/)
 * (@friendlyhal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/draft-and-media-updates-lost/#post-6352925)
 * I’ve had this happen to me a few times if I’m not paying attention.
 * WordPress auto-saves for you to some extent if you don’t do it manually and to
   see the previous revisions there is a line that says “revisions” in a window 
   in the top-right while you’re editing your page. The window is labeled “Publish.”
   If it’s not there you’re probably out of luck.

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

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