Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Invalid Argument Warning « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Invalid Argument Warning

(2 posts)
  • Started 2 years ago by erikas_boy
  • Latest reply from em hr
  • This topic is not resolved

  1. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    erikas_boy

    Member

    Hello,
    So, here's what I was trying, I'll get to the error in a moment. I want my blog to only show the two most recent posts on the front page, but show 10 posts on every other page (/2/, category archive, tag archive, search, etc). So I set show posts in the backend to 10, then grabbed this from content-extensions.php


    global $options, $blog_id;

    foreach ($options as $value) {
    if (get_option( $value['id'] ) === FALSE) {
    $$value['id'] = $value['std'];
    } else {
    if (THEMATIC_MB)
    {
    $$value['id'] = get_option($blog_id, $value['id'] );
    }
    else
    {
    $$value['id'] = get_option( $value['id'] );
    }
    }
    }

    /* Count the number of posts so we can insert a widgetized area */ $count = 1;
    while ( have_posts() ) : the_post();

    thematic_abovepost(); ?>

    <div id="post-<?php the_ID();
    echo '" ';
    if (!(THEMATIC_COMPATIBLE_POST_CLASS)) {
    post_class();
    echo '>';
    } else {
    echo 'class="';
    thematic_post_class();
    echo '">';
    }
    thematic_postheader(); ?>
    <div class="entry-content">
    <?php thematic_content(); ?>

    <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
    </div><!-- .entry-content -->
    <?php thematic_postfooter(); ?>
    </div><!-- #post -->

    <?php

    thematic_belowpost();

    comments_template();

    if ($count==$thm_insert_position) {
    get_sidebar('index-insert');
    }
    $count = $count + 1;
    endwhile;
    }
    }

    Then edited
    while ( have_posts() ) : the_post();
    to
    while ( have_posts() && $count<3 ) : the_post();

    This did what I wanted, 2 on the index, and 10 everywhere else. Except it started throwing an error. Specifically: Warning: Invalid argument supplied for foreach() in /home/content/17/4755417/html/beer/wp-content/themes/TBB/functions.php on line 399, which is the line

    foreach ($options as $value) {

    It continues to throw the error when I remove my edited line. It seems to be a problem with the array, but darned if I can figure out what it is. I (obviously) copied and pasted the code from the content-extensions.php file into my functions.php in my child theme.

    So, am I missing something really obvious? Including a much easier way to do what I want, which I would have expected to find via google/searching here.

    Thanks in advance.

    Posted 2 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    em hr

    Moderator

    This is likely because the global variable $options is no longer used in Thematic.

    Current versions of thematic handle this code using the helper function thematic_get_theme_opt()

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183