Category Archives: Wordpress

How-to for Wordpress

New Versions of WordPress Abort MORE

WordPress is getting to be more and more a nuisance to debug in dreamweaver. Loading WordPress in Dreamweaver causes an immediate shutting of Dreamweaver. This was happening in the past because of the inclusion of the files dashicons.css and dashicons.min.css in the includes/css directory. They were not needed for testing and typical development, so, they could simply be deleted. dashicons.css and dashicons.min.css offer simple use CSS icons that are used primarily in the admin area, though they could be used in any of your development. Deleting dashicons.css and dashicons.min.css left the admin area without icons, but, the icon text descriptions remained and you could live with for preliminary testing. However, now we are back to the same crash problem.

More oversize strings have been added to other files in WordPress and they cause Dreamweaver to exhaust its workspace memory and crash. . Now, to do debugging in Dreamweaver, the following files and directories must be deleted from WordPress:

  • wp-includes/css/dashicons.css
  • wp-includes/css/dashicons.min.css
  • wp-content/themestwentyfourteen/genericons (full directory)
  • wp-content/themestwentythirteen/genericons (full directory)
  • uploads/am_assets

Deleting these files/directories allow debugging in Dreamweaver. Again when testing, the situation relates to availabiliity of CSS icons and assets … for the development. These deletions increase the number of items that vanish in your use of wordpress, but, maybe you can live knowing that in preliminary debug icons and assets will be missing, but, available in an integration test. If you understand what you are deleting and what you can expect from these deletions, no problem. When you load a full version of WordPress in a full installation all icon functionality returns, but, the nuisance level of development is increasing. Someday, we will want to upgrade your Dreamweaver or start using NetBeans or Eclipse to avoid the problem.

Personally, I find Eclipse or NetBeans will be a reasonably good replacement for Dreamweaver. They are free and have some very nice features. In some cases, they have nicer features than Dreamweaver, though they do miss a few features I do like in Dreamweaver. Their big problem is they are harder to install and interface with the test server, but, if Dreamweaver continues to be a nuisance, they will be far better alternative.

Dreamweaver Closes as it is Opening

Are you having a problem with Dreamweaver closing down (vanishing) as it starts to open new versions of WordPress?

Recent versions of WordPress have a new CSS file that is causing Dreamweaver no end of trouble. Attempting to load WordPress in Dreamweaver causes a partial load, then suddenly the load crashes and Dreamweaver vanishes from the screen. This is being caused by the recent change in WordPress to update the administration panel.

WordPress has added the CSS file /wp-includes/css/dashicons.min.css. This file is intended to add icons to the administration panel by using Font-face. Unfortunately this font face is enormous. The string incorporated in the font-face declaration is too large to be supported by Dreamweaver, causing Dreamweaver to crash.

Luckily, there is a solution to this problem. The solution is simple. If your version of Dreamweaver has the size limitation that causes crashes, simply delete the files /wp-includes/css/dashicons.min.css and /wp-includes/css/dashicons.css from your WordPress development environment. This will have little impact on your development.

Deleting the dashicons files from your development environment will have minor impact, but, probably none that bother your development. The deletion may cause the absence of font-face created icons in the administration area of your WordPress work environment, But, you will still see the alternate text associated with the icons. You can continue to work conveniently.

Warning: Remember as you load your work on your target website, you have deleted the dashicons files. Remember to include the dashicons files in your official release or your target site will have missing icons in the administration area.

Losing paragraph Tags in WordPress Posts

WordPress Logo

If you are one of the folks that work with (or want to work with) WordPress to create websites and have control over the CSS, you may have been having problems with the loss of paragraph (<p> </p>) tags in the WordPress editor. You may be wandering around looking for a solution, and have been having trouble finding a solution. There is a solution.

Background: The Tiny MCE editor strips <br/> tags and </p> <p> tags. Worst yet, it removes them inconsistently. Apparently, this was originally designed into the program to avoid some old security problem with the editor.

Solution: Install the TinyMCE Advanced plugin. Go to the settings/configuration area for TinyMCE Advanced and click to stop removing the tags. Much better. Enjoy ….

Adding a Widget Area to a WordPress Theme

Are you a person interested in adding a new widget area to your WordPress site? Many templates have widgets in the sidebars, or footer, but, perhaps you need another widget area, for example, in the header. The following explains how to create a new widget area.

Adding a new widget area requires two fairly simple steps:

  • Add content to the functions.php file
  • Add a line of code where you want the new widget area

Step 1 – add a widget area definition to functions.php

Add the following code to the end of your functions.php file. (You may create a custom functions.php file in your theme directory)


   if (function_exists('register_sidebar')) {

     register_sidebar(array(
       'name' => 'Header Area',
       'id'   => 'header-area',
       'description'   => 'This is the header area.',
       'before_widget' => '<div id="%1$s" class="widget %2$s">',
       'after_widget'  => '</div>',
       'before_title'  => '<h4>',
       'after_title'   => '</h4>'
     ));
  }

The preceding code would define a widget area that will have the label “Header Area” in the administration area. This widget would have an “h4” header for the title, and bracket the widget with “div.” You can change the widget wrapper and header type to meet your needs.

Add some code where you want the widget to display

Decide where you want the widget displayed. If this were to be added to the header area, modify file header.php, including the following code where you want the widget inserted.



   <div id="header-area">
    <?php if (function_exists('dynamic_sidebar') && 
              dynamic_sidebar('header-area'))  endif; ?>
   </div>

Warning about Google Maps and WordPress

Warning. As I was working on my previous post, I notices an interesting incompatibility between the WordPress template I was using and Google Maps. The template in use has a CSS configuration of:

.entry_content img { max-width: 100% ; }

The previous css seems minor enough, but, this declaration affected the Google Map on the page. The result is a map that shows no zoom controls. Instead, where the controls should be, they display as small white marks. In the event that you happen upon a template that does not seem to be compatible with Google Maps (because the zoom controls are missing) check to see if there is a CSS declaration defining “img {max-width: 100% }” in a manner it might be affecting the map. If so, you will need to create a CSS declaration that will override this command. It appears that img max-width must be configured to “none,” or the controls will be incorrectly displayed.