Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • andy
  • jeffw

Support for: Razor: Cutting Edge WordPress Theme

Razor

Public Group  |  active 1 year, 9 months ago ago
Viewing post 1 to 8 (8 total posts)

Error appears on every page with a blog code

  • igorflor

    said

    Hello,
    I have just installed the Razor theme on my website. Here is the address: http://www.bionomica.ru
    On every page with a blog code an error like this appears: Notice: Undefined index: excerpt_length in /www/bionomic/www/htdocs/wp-content/themes/parallelus-razor/framework/theme-functions/layout-and-design.php on line 1225
    For example, on this page: http://bionomica.ru/bionics/
    Please, help me get rid of this.

  • jeffw

    said

    I can’t replicate this on my Razor sandbox site so it must be caused by something specific to your installation.

    I see you are using a child theme so the first thing to try is switching to the parent theme. Does the same thing happen when you switch to using the Razor parent theme?

  • igorflor

    said

    When I switch to the Razor parent theme I see something that looks like what I see using the Child theme. Here is what I see:

    Notice: Undefined index: excerpt_length in /www/bionomic/www/htdocs/wp-content/themes/parallelus-razor/framework/theme-functions/layout-and-design.php on line 1225

    Notice: Undefined index: read_more in /www/bionomic/www/htdocs/wp-content/themes/parallelus-razor/framework/theme-functions/layout-and-design.php on line 1226

  • jeffw

    said

    These are not errors or warnings, these are notices. Notices do not affect the execution of PHP in any way, they are just notices. Very often PHP notices mean nothing, i.e. they report issues that are not actually issues. If you don’t want to see these notices then you will need to set WP_DEBUG to false.

  • igorflor

    said

    Dear Jeffw,
    Thank you for your teaching. No, I wouldn’t like to see those notices, but, actually, It’s more important for me that the visitors of the site don’t see them. Please, could you explain how to set WP_DEBUG to false: I’ve never done that before.

  • igorflor

    said

    Jeffw,
    I have just googled for Debugging in WordPress and found that “it is usually set to true in the wp-config.php file”. I checked the file “wp-config” of my site and found that WB_DEBUG is set to FALSE. Or I am wrong? Here is how the line 71 looks: define(‘WP_DEBUG’, false);
    What do you suggest I should do?

  • igorflor

    said

    Jeffw,
    I have found the solution! I added more values to the blog code. Originally, it was like this: “[blog category = "" posts_per_page="2"]” and it caused the notices. Then, I made it this: “[blog category = "11" posts_per_page="2" image_width="200" image_height="200" excerpt_length="50" read_more="Read more"]” and the notices disappeared. As far as I understand in this particular case indicating the values “excerpt_length” and “read_more” was essential.

  • jeffw

    said

    WP_DEBUG is set to false by default. If you set it to true then you will see PHP notices, if there are any.

    If WP_DEBUG is set to false in your ‘wp-config.php’ file and you still see PHP notices then there must be a server setting that is overriding the WordPress setting. You should contact your web host about this because it is not a theme related issue.

    The only [blog] shortcode attribute that is required is the category attribute. For example…

    [blog category=""]

    The above shortcode will output a paginated list of all posts using default values for all the other attributes.

    If you see PHP notices when you use that shortcode then it means either WP_DEBUG is set to true, or your server is doing the equivalent. Either way it is not a theme issue.

Viewing post 1 to 8 (8 total posts)
Topic tags: blog code, error