Increasing memory allocated to PHP

Increasing memory allocated to PHP

I needed to do this when I got blank screens after installing Buddypress

source: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

Also released with Version 2.5, the WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as “Allowed memory size of xxxxxx bytes exhausted”.

This setting increases PHP Memory only for WordPress, not other applications. By default, WordPress will attempt to increase memory allocated to PHP to 40MB (code is at beginning of wp-settings.php), so the setting in wp-config.php should reflect something higher than 40MB. Read More

CSS tricks

Vertical align anything with just 3 lines of CSS

source http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/

.element {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

It is a similar technique to the absolute-position method, but with the upside that we don’t have to set any height on the element or position-property on the parent. It works straight out of the box, even in IE9.

To make it even more simple, we can write it as a mixin with its vendor prefixes:

@mixin vertical-align {
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}
 
.element p {
  @include vertical-align;
}

Why: custom Taxonomy doesn’t appear in the custom menu? Because: set he screen options for your client

So you want to add your custom taxonomy to a menu. You probably have to alter your screen options to let the taxonomy appear in your ‘menus’ menu. However, these settings are user -specific. So if your client also should be able to change this menu, switch to your client’s profile and change the screen options accordingly. Or tell your client how it works…

Export a path from AI to png

To export a path from AI (CS5)  do the following:

See also http://creativedroplets.com/transparent-png-with-illustrator/

  • Select the path(s) you want to export
  • Copy and paste it somewhere if necessary
  • Draw an artboard somewhere with the artboard tool
  • In the artboard presets select fit to selected art
  • Now export as png and check the box ‘use artboards’
  • Select your artboard
  • Select the correct resolution (if the resolution is different from the AI source, the png size will change accordingly)

WordPress Multilingual (WPML) – tips

Just some short notes on using WPML in wordpress:

Translating theme strings

In the code use this for strings that should be translated (example is for ‘roots’  theme)

echo __('Instructors', 'roots')

Then in the WPML settings, got to the tab ‘Theme and plugins localization’

Scroll down and click ‘Scan the theme for Strings’

Then scroll slighlty up and click the button ‘View strings that need translation’

Add your translation(s) and save