ThemesFAQ

(Difference between revisions)
Jump to: navigation, search
(Added "Nesting level too deep – recursive dependency")
(How to change the Start Here link from the theme options)
(17 intermediate revisions by 3 users not shown)
Line 15: Line 15:
 
   return "http://ithemes.com/customizing-theme-menu-with-filters/";
 
   return "http://ithemes.com/customizing-theme-menu-with-filters/";
 
}
 
}
 +
add_filter( 'it_tutorials_filter_url', 'it_modify_tutorials_url', 20 );
 +
</pre>
 +
 +
http://ithemes.com/customizing-theme-menu-with-filters/ has more details.
 +
 +
<u>Note</u>: In our Builder theme,
 +
 +
<pre class="brush:php;">
 
add_filter( 'it_tutorials_filter_url', 'it_modify_tutorials_url' );
 
add_filter( 'it_tutorials_filter_url', 'it_modify_tutorials_url' );
 +
</pre>
 +
 +
should be changed to
 +
 +
<pre class="brush:php;">
 +
add_filter( 'it_tutorials_filter_url', 'it_modify_tutorials_url', 20 );
 
</pre>
 
</pre>
  
 
=== Drop down menus appearing behind the video ===
 
=== Drop down menus appearing behind the video ===
For the video embed, use the following code:
+
 
 +
To fix an iframe-style Youtube embed, add <code>?wmode=transparent</code> to the "src" parameter of the embed.
 +
 
 +
For example the following embed code:
 +
 
 +
<pre>
 +
<iframe width="560" height="315" src="http://www.youtube.com/embed/4r7wHMg5Yjg" frameborder="0" allowfullscreen></iframe>
 +
</pre>
 +
 
 +
should be changed to:
 +
 
 +
<pre>
 +
<iframe width="560" height="315" src="http://www.youtube.com/embed/4r7wHMg5Yjg?wmode=transparent" frameborder="0" allowfullscreen></iframe>
 +
</pre>
 +
 
 +
A good description of what the ''wmode'' parameter does for Flash can be found [http://www.communitymx.com/content/article.cfm?cid=e5141 here]. Adding the parameter on the Youtube ''src'' simply causes Youtube to produce different output that properly sets Flash's ''wmode'' to ''transparent''.
 +
 
 +
When using the traditional style embed code, have it like this:
  
 
<pre class="brush:php;">
 
<pre class="brush:php;">
Line 28: Line 59:
 
</pre>
 
</pre>
  
Note the added <param name="wmode" value="transparent"> at the beginning, and wmode="transparent" at the end of the embed code. Add the <param name="wmode" value="transparent"> after the  first opening <object width="nnn″ height="mmm″>, and the other parameter right at the end after the height="nnn″ and before the closing </object> tag.
+
Note the added <param name="wmode" value="transparent"> at the beginning, and wmode="transparent" at the end of the embed code. Add the <param name="wmode" value="transparent"> after the  first opening <object width="nnn″ height="mmm″>, and the other parameter right at the end after the height="nnn″ and before the closing </object> tag.
 
+
  
 
For an alternative solution using your functions.php file, see http://training.ithemes.com/fix-the-menu-video-overlap/
 
For an alternative solution using your functions.php file, see http://training.ithemes.com/fix-the-menu-video-overlap/
 +
 +
=== How to enable comments on pages ===
 +
* '''What''': Not all themes will allow comments on pages by default.
 +
* '''How''': Modify your page.php theme template file (and any other page templates that you may be using) as described here:
 +
 +
Some themes will have the comments template included, but [http://codex.wordpress.org/Commenting_Code#Commenting_Out_Code "commented out"], so the code will not be interpreted. In php, code preceded by // (double forwards slashes) will be ignored. To enable commenting on pages using such a template, remove the double // (in front of <code>&lt;?php comments_template(); ?></code>). In cases where this line does not exists, add the <code>&lt;?php comments_template(); ?></code> in the same location as indicated and highlighted in the following sample page template (again, note, not all page templates look exactly the same, but each will have a similar structure).
 +
<pre class="brush:php; highlight: [21];">
 +
<?php get_header(); global $wp_theme_options; ?>
 +
<!--page.php-->
 +
 +
<div id="container" class="clearfix">
 +
 +
<div id="content">
 +
   
 +
<?php if (have_posts()) : while (have_posts()) : the_post(); // the loop ?>
 +
 +
<!--post title-->
 +
<h1 class="pagetitle" id="post-<?php the_ID(); ?>"><?php the_title(); ?></h1>
 +
 +
<div class="entry">
 +
<!--post text with the read more link-->
 +
<?php the_content(); ?>
 +
<?php edit_post_link('(Edit this page)', '<br />', ''); ?>
 +
<!--for paginate posts-->
 +
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
 +
</div>
 +
 +
<?php //comments_template(); // uncomment this if you want to include comments template ?>
 +
 +
<?php endwhile; // end of one post ?>
 +
<?php else : // do not delete ?>
 +
 +
<h3><?php _e("Page not Found"); ?></h3>
 +
<p><?php _e("We're sorry, but the page you're looking for isn't here."); ?></p>
 +
<p><?php _e("Try searching for the page you are looking for or using the navigation in the header or sidebar"); ?></p>
 +
 +
<?php endif; // do not delete ?>
 +
 +
</div><!--end content div-->
 +
 +
<?php get_sidebar(); ?>
 +
 +
<?php get_footer(); ?>
 +
</pre>
 +
 +
=== How to create a blog page ===
 +
NOTE: this does '''NOT''' apply to the Builder theme
 +
 +
* '''What''': The theme homepage is not a blog index page, how do I create a one?
 +
* '''Why''': In particular the more CMS like themes will have a static front page rather than a blog index page as the front page
 +
 +
To create a blog page for these themes you should:
 +
* write a new page, name it "Blog" (or "News" or whatever you fancy)
 +
* no need to add any content
 +
* from the page attributes dropdown on the right side, select the "Blog" page template (in some themes this template is named "Blog Page" or "Blog Index" or something similar)
 +
* publish the page
 +
* add the page to your navigation
 +
 +
and that should be it
  
 
== PHP Error messages ==
 
== PHP Error messages ==
Line 38: Line 127:
 
* '''Solution''':
 
* '''Solution''':
 
1. Add this line to your wp-config.php file:
 
1. Add this line to your wp-config.php file:
<pre class="brush:plain; gutter: false;">define('WP_MEMORY_LIMIT', '64M');</pre>
+
<pre class="brush:plain; gutter: false;">define('WP_MEMORY_LIMIT', '128M');</pre>
  
if that doens't work:
+
if that doesn't work:
  
 
2. If you have access to your PHP.ini file, change the line in PHP.ini
 
2. If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 32M try 64M:
+
If your line shows 32M try 128M:
<pre class="brush:plain; gutter: false;">memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)</pre>
+
<pre class="brush:plain; gutter: false;">memory_limit = 128M ; </pre>
  
 
3. If you don't have access to PHP.ini try adding this to the .htaccess file in the root of your WordPress site:
 
3. If you don't have access to PHP.ini try adding this to the .htaccess file in the root of your WordPress site:
<pre class="brush:plain; gutter: false;">php_value memory_limit 64M</pre>
+
<pre class="brush:plain; gutter: false;">php_value memory_limit 128M</pre>
  
 
[http://www.google.com/search?&q=wordpress+allowed+memory+size More resources].
 
[http://www.google.com/search?&q=wordpress+allowed+memory+size More resources].
  
If all fails, you should contact your hosting provider and ask them to increase the memory limit. They will know what it's about.
+
4. If all fails, you should contact your hosting provider and ask them to increase the memory limit. They will know what it's about.
 +
 
 +
'''NOTE:''' Even when you have set the memory limit to a larger value using method 1, 2 or 3, you may still run into this error. Changes you make to your local php.ini or .htaccess file may not be effective, and protected or overridden by your host.
 +
 
 +
Install, and activate our free [http://pluginbuddy.com/free-wordpress-plugins/serverbuddy/ Serverbuddy plugin]. Upon installation and activation you will find an entry for ServerBuddy in the "Tools" menu in your WordPress dashboard. Check the actual PHP memory limit.
 +
 
 +
If it does not reflect the value you have entered, contact your hosting provider.
 +
 
 +
====How much MB is my memory limit?====
 +
The error message will show something like "Allowed memory size of 33554432 bytes exhausted". So how much MB is that?
 +
 
 +
33554432 bytes = 32 MB
 +
 
 +
67108864 bytes = 64 MB (which is considered more or less the minimum for running a standard WordPress site, higher is recommended)
 +
 
 +
134217728 bytes = 128 MB
 +
 
 +
To get these values yourself, in Google search, type: "33554432 bytes in MB" (without the quotes) and the result will show on top of the search results.
  
 
=== Error message: Call to undefined function function_name() ===
 
=== Error message: Call to undefined function function_name() ===

Revision as of 16:19, October 26, 2012

Contents

General

How to change the Start Here link from the theme options

  • What: All iThemes themes come with a set of theme options in the WordPress dashboard. The first option is a "Start Here" link that will show a generic page with several related (and unrelated) video tutorials. To unbrand the theme, or to brand it as your own, you can change the page that the Start Here links to, to any page you desire. The highlighted line indicates where the URL is defined.
  • How: Add the following code to your child themes functions.php.
// Change the name Start Here 
function it_modify_tutorial_menu_name($name) {
    return "This is MY menu";
}
add_filter( 'it_tutorials_menu_name', 'it_modify_tutorial_menu_name' );

// Change the URL it links to
function it_modify_tutorials_url($url) {
   return "http://ithemes.com/customizing-theme-menu-with-filters/";
}
add_filter( 'it_tutorials_filter_url', 'it_modify_tutorials_url', 20 );

http://ithemes.com/customizing-theme-menu-with-filters/ has more details.

Note: In our Builder theme,

add_filter( 'it_tutorials_filter_url', 'it_modify_tutorials_url' );

should be changed to

add_filter( 'it_tutorials_filter_url', 'it_modify_tutorials_url', 20 );

Drop down menus appearing behind the video

To fix an iframe-style Youtube embed, add ?wmode=transparent to the "src" parameter of the embed.

For example the following embed code:

<iframe width="560" height="315" src="http://www.youtube.com/embed/4r7wHMg5Yjg" frameborder="0" allowfullscreen></iframe>

should be changed to:

<iframe width="560" height="315" src="http://www.youtube.com/embed/4r7wHMg5Yjg?wmode=transparent" frameborder="0" allowfullscreen></iframe>

A good description of what the wmode parameter does for Flash can be found here. Adding the parameter on the Youtube src simply causes Youtube to produce different output that properly sets Flash's wmode to transparent.

When using the traditional style embed code, have it like this:

<object height="344" width="425"><param name="wmode" value="transparent"><param name="movie" 
value="http://www.youtube.com/v/nRCExL6VQzI&hl=en&fs=1&"><param name="allowFullScreen" value="true">
<param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/nRCExL6VQzI&hl=en&fs=1&" 
type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425" wmode="transparent"></object>

Note the added <param name="wmode" value="transparent"> at the beginning, and wmode="transparent" at the end of the embed code. Add the <param name="wmode" value="transparent"> after the first opening <object width="nnn″ height="mmm″>, and the other parameter right at the end after the height="nnn″ and before the closing </object> tag.

For an alternative solution using your functions.php file, see http://training.ithemes.com/fix-the-menu-video-overlap/

How to enable comments on pages

  • What: Not all themes will allow comments on pages by default.
  • How: Modify your page.php theme template file (and any other page templates that you may be using) as described here:

Some themes will have the comments template included, but "commented out", so the code will not be interpreted. In php, code preceded by // (double forwards slashes) will be ignored. To enable commenting on pages using such a template, remove the double // (in front of <?php comments_template(); ?>). In cases where this line does not exists, add the <?php comments_template(); ?> in the same location as indicated and highlighted in the following sample page template (again, note, not all page templates look exactly the same, but each will have a similar structure).

<?php get_header(); global $wp_theme_options; ?>
<!--page.php-->

	<div id="container" class="clearfix">

		<div id="content">
    
<?php if (have_posts()) : while (have_posts()) : the_post(); // the loop ?>

			<!--post title-->
			<h1 class="pagetitle" id="post-<?php the_ID(); ?>"><?php the_title(); ?></h1>

			<div class="entry">
				<!--post text with the read more link-->
				<?php the_content(); ?>
				<?php edit_post_link('(Edit this page)', '<br />', ''); ?>
				<!--for paginate posts-->
				<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
			</div>

			<?php //comments_template(); // uncomment this if you want to include comments template ?>
	
<?php endwhile; // end of one post ?>
<?php else : // do not delete ?>
	
			<h3><?php _e("Page not Found"); ?></h3>
			<p><?php _e("We're sorry, but the page you're looking for isn't here."); ?></p>
			<p><?php _e("Try searching for the page you are looking for or using the navigation in the header or sidebar"); ?></p>

<?php endif; // do not delete ?>

		</div><!--end content div-->

<?php get_sidebar(); ?>

<?php get_footer(); ?>

How to create a blog page

NOTE: this does NOT apply to the Builder theme

  • What: The theme homepage is not a blog index page, how do I create a one?
  • Why: In particular the more CMS like themes will have a static front page rather than a blog index page as the front page

To create a blog page for these themes you should:

  • write a new page, name it "Blog" (or "News" or whatever you fancy)
  • no need to add any content
  • from the page attributes dropdown on the right side, select the "Blog" page template (in some themes this template is named "Blog Page" or "Blog Index" or something similar)
  • publish the page
  • add the page to your navigation

and that should be it

PHP Error messages

Error message: Out of memory (allocated 14680064) (tried to allocate 4864 bytes) (values may differ)

  • Cause: the message refers to a PHP error, and indicates that the memory limit size in the php configuration is too low.
  • Solution:

1. Add this line to your wp-config.php file:

define('WP_MEMORY_LIMIT', '128M');

if that doesn't work:

2. If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 128M:

memory_limit = 128M ; 

3. If you don't have access to PHP.ini try adding this to the .htaccess file in the root of your WordPress site:

php_value memory_limit 128M

More resources.

4. If all fails, you should contact your hosting provider and ask them to increase the memory limit. They will know what it's about.

NOTE: Even when you have set the memory limit to a larger value using method 1, 2 or 3, you may still run into this error. Changes you make to your local php.ini or .htaccess file may not be effective, and protected or overridden by your host.

Install, and activate our free Serverbuddy plugin. Upon installation and activation you will find an entry for ServerBuddy in the "Tools" menu in your WordPress dashboard. Check the actual PHP memory limit.

If it does not reflect the value you have entered, contact your hosting provider.

How much MB is my memory limit?

The error message will show something like "Allowed memory size of 33554432 bytes exhausted". So how much MB is that?

33554432 bytes = 32 MB

67108864 bytes = 64 MB (which is considered more or less the minimum for running a standard WordPress site, higher is recommended)

134217728 bytes = 128 MB

To get these values yourself, in Google search, type: "33554432 bytes in MB" (without the quotes) and the result will show on top of the search results.

Error message: Call to undefined function function_name()

  • Cause: WordPress, the theme, or a plugin tries to execute a function that does not exist.
  • Solution: Depending on where the error occurs (in a WordPress function, a Theme function or a Plugin function) update WordPress, the theme or the plugin to the latest version.

Nesting level too deep – recursive dependency

Example forum post reporting this problem

This is generally caused by an old version of PHP (4) on your server. Request your host to update PHP to the latest version.

Featured Images

Images not showing

  • Cause: This occurs typically (but not necessarily!) after upgrading WordPress. The value for the uploads location in the WordPress settings has become corrupted, and shows a long value such as for instance domain.com/home/someone/public_html/domain/wp-content/uploads
  • Solution: Make sure that the value for your "uploads folder" is as recommended: wp-content/uploads.
Recommended settings for the uploads folder

    • In WordPress 3+, find this value in wp-dashboard > Settings > Media
    • In older WordPress versions, look in wp-dashboard > Settings > Miscellaneous

PluginBuddy

PluginBuddy licensing issues

  • Description: licenses do not "stick", issues after upgrading to WordPress 3, and others
  • Cause: Due to some major changes in the way WordPress 3 handles plugin upgrades, the PluginBuddy licensing system is affected.
  • Solution: In order to resolve this, you need to make sure that ALL PluginBuddy plugins that you have purchased and installed are updated to the LATEST version. Updating using the plugins panel is not possible, for the reasons mentioned before. Even if only one plugin is outdated, it will affect all the other plugins. This includes plugins that come free with your purchase of Flexx or Builder
    So you should:
      • De-activate ALL PluginBuddy plugins
      • Download the latest versions of the plugins from your members area.
      • Upload these to your server, either (recommended) using the Easy Theme and Plugin updater plugin (download link), which will create a backup of the existing plugin - just in case -
        or using FTP (in which case you need to unzip the plugins first) and then upload the entire plugin folder with contents to the wp-content/plugins/ folder. Note, REMOVE the old versions of the plugin first, or RENAME the existing plugin folder.
      • Then re-activate the PluginBuddy plugins, and request a new license using the general plugin page.
  • Further Discussion: HERE
Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox