Aries-Belgium
Forum Replies Created
-
Forum: Plugins
In reply to: Class “current_page_ancestor” not getting attached for post parentHi adam.codefor,
I just had the same problem. For me it was a plugin that was causing problems. Luckily one of my own so I could resolve the issue. The problem is that the plugin calls the get_pages() function and that that array gets cached so the wp_list_pages() function will read that cache instead of fetching it out of the database. For some reason the current_page_ancestor class doesn’t get set then.
The only thing I could do was flushing the cache (=wp_cache_flush()) to force WP to rebuild the cache and then it worked.
Forum: Plugins
In reply to: plugin development: plugin activation and tinymce problemHi, about that tinyMCE problem.
I was just having the same problem.I figured out that the initialization function of tinyMCE loaded after my own initialization function (on document load) so I set a small delay to add the controls to the textareas. Something like this:
jQuery(function(){ window.setTimeout( function(){ jQuery("textarea.mceEditor").each(function(i){ this.id = "mceEditor" + (i + 1); tinyMCE.execCommand("mceAddControl", false, this.id); }); }, 100); });
To my surprise this worked. The only problem is that it keeps loading in FF. You can do everything but the spinner keeps on going.
Forum: Plugins
In reply to: divide loop by daysYou can delete the while loop because it doens’t do anything anymore.
i still want to know how to change the date to “today” and “yesterday”.
switch(true) { case $post->post_date >= strtotime("today"): $datestr = "Today"; break; case $post->post_date >= strtotime("yesterday"): $datestr = "Yesterday"; break; default: $datestr = date( "F j, Y" , strtotime( $post->post_date ) ); ; break; }
Forum: Plugins
In reply to: Plugin for hidden links on WordPressWhat do you mean with hidden links?
Forum: Plugins
In reply to: divide loop by days<?php $prev_date = null; $posts = get_posts(array('orderby'=>'post_date')); foreach( $posts as $post ): $date = date( "F j, Y" , strtotime( $post->post_date ) ); if( $date != $prev_date ): ?> <h3><?php echo $date ?></h3> <?php $prev_date = $date; endif; ?> <div><?php echo $post->post_content ?></div> <?php endforeach; ?>