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
How to make Singe Insert behave like Index Insert « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

How to make Singe Insert behave like Index Insert

(7 posts)
  • Started 5 years ago by joeangelo
  • Latest reply from daveread
  • This topic is 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
    joeangelo

    Member

    Does anyone know of a way to make single insert behave like index insert? What I want is to have single insert appear after x-numbers of paragraphs on a post.

    This above might not be possible so is there a way to add a new widgetized area which can be called manually whenever you type a post?

    Thanks.

    Posted 5 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
    Chris

    Moderator

    Hi,

    ever thought about using shortcodes to realize this one?! :)

    No? .. let's do some magic (I'm not doing the whole work, only part of it):

    function widget_insidepost() {
    	// This is pretty weird, but it works. We start the cache ..
    	ob_start();
    	// .. *yikes* .. can't remember if this is SVN revision only or not .. it displays the CSS markup before the widget area
    	echo thematic_before_widget_area('single-insert');
    	// .. I know .. I'm lazy. I duplicated the single insert widget area.
    	dynamic_sidebar('single-insert');
    	// .. see comment above .. it displays the CSS markup after the widget area
    	echo thematic_after_widget_area('single-insert');
    	// Put everything from the black cauldron into $widget_inside
    	$widget_inside = ob_get_contents();
    	// end that caching process
    	ob_end_clean();
    	// return the ingredients
        return $widget_inside;
    }
    // Let's do some magic and exchange [widget-inside] against the ingredients
    add_shortcode('widget-inside', 'widget_insidepost');

    Use [widget-inside] somewhere in your post to display the widgetized area.

    It works .. any better ideas??

    Chris

    Posted 5 years ago #
  3. anthony99
    Member

    Hello Chris

    Any chance you could help me with my problem? I have an unresolved thread a bit farther down the page.

    THANK YOU.

    Posted 5 years ago #

  4. 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

    that's wicked cool =)

    Looks like a set up for a really long widgetcontext/widget logic entry.

    Posted 5 years ago #

  5. 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
    joeangelo

    Member

    Hey Chris,

    Thanks for the detailed instructions on how you wave that magic wand :)

    Never thought about using widget logic before, thanks for the suggestion.

    I'll report back once i've made this work in the site.

    Posted 5 years ago #

  6. 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
    joeangelo

    Member

    tested and working.

    For those who want to add a new widget area and not just duplicate "single-insert widget", try this code:

    //ADD new widget for widget-inside
    function my_widgets_init() {
        register_sidebar(array(
           	'name' => 'Widget Inside',
           	'id' => 'Widget Inside',
           	'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
           	'after_widget' => "\n",
    		'before_title' => "<h3 class=\"widgettitle\">",
    		'after_title' => "</h3>\n",
        ));
    
    }
    add_action( 'init', 'my_widgets_init' );
    //End Widget-insdie code
    
    //Widget inside post
    function widget_insidepost() {
    	// This is pretty weird, but it works. We start the cache ..
    	ob_start();
    	// .. *yikes* .. can't remember if this is SVN revision only or not .. it displays the CSS markup before the widget area
    	echo thematic_before_widget_area('widget-inside');
    	// .. I know .. I'm lazy. I duplicated the single insert widget area.
    	dynamic_sidebar('widget-inside');
    	// .. see comment above .. it displays the CSS markup after the widget area
    	echo thematic_after_widget_area('widget-inside');
    	// Put everything from the black cauldron into $widget_inside
    	$widget_inside = ob_get_contents();
    	// end that caching process
    	ob_end_clean();
    	// return the ingredients
        return $widget_inside;
    }
    // Let's do some magic and exchange [widget-inside] against the ingredients
    add_shortcode('widget-inside', 'widget_insidepost');

    The original code simply duplicates the "single-insert" inside the post. I added a code to create a new widgetized area and edited Chris' code to display the "widget-inside" widget instead of single-insert.

    And if you want to save some time in writing "[widget-inside]" for every new post, add this code in your functions.php file as well:

    function my_default_post_content()
    {
    $dpc = '[widget-inside]';
    return $dpc;
    }
    add_filter('default_content', 'my_default_post_content');

    Posted 5 years ago #

  7. 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
    daveread

    Member

    Thanks for this, BUT - any ideas why I still need to insert shortcode on posts/pages, even though the new widget shows up with all the others in the admin panel? BUT it works as advertised on my other site which uses the same child theme? Here they are:
    http://www.berkshirelinks.com (needs shortcode);
    http://www.newberkshire.com.

    Posted 4 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