prw
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Whitespace being added to textareaoh my god, this has been bugging me for months, (all the while this post was sitting here and i never found it)… stupid *grumbles*
Forum: Plugins
In reply to: wp_query() specific posts with post__indont forget to add ‘post_type’
so you would have:
$bloblor = array(43,45); $args = array( 'post_type' => 'page', 'post__in' => $bloblor); $spotlight = new WP_Query($args); while ($spotlight->have_posts()) : $spotlight->the_post(); $do_not_duplicate = $post->ID; ?> <?php the_content(); ?> <?php endwhile; ?>
Forum: Fixing WordPress
In reply to: problem with query_posts and post__ini just found the solution (for the second time cause i remember now that i found it before also)..
you have to add post_type before ‘post__in’
so…
$query_array = array('post_type' => 'page', 'post__in' => array(1,2,3));
Forum: Plugins
In reply to: Adding a filter to ether get_bookmarks or wp_list_bookmarksyou could use a preg_replace to inject the code.
i wanted to use highslide to expand my links without leaving the website, so i added this:
function make_hs_simple($content) { $pattern = "/<a(.*?)href=('|\")([A-Za-z0-9\/_\.\~\:-]*?)('|\")([^\>]*?)>/i"; $replacement = '<a$1href=$2$3$4$5 onclick="return hs.htmlExpand(this, { objectType: \'iframe\', allowHeightReduction: true, allowWidthReduction: true} )">'; $content = preg_replace($pattern, $replacement, $content); return $content; } add_filter('wp_list_bookmarks', 'make_hs_simple');
if you added global $post within the function, then replaced all the onlick like this:
function make_hs_simple($content) { global $post $pattern = "/<a(.*?)href=('|\")([A-Za-z0-9\/_\.\~\:-]*?)('|\")([^\>]*?)>/i"; $replacement = '<a$1href=$2$3$4$5 '. $post->ID.'>'; $content = preg_replace($pattern, $replacement, $content); return $content; } add_filter('wp_list_bookmarks', 'make_hs_simple');
i dont know if thats exactly how you wanted it to work, but it did the trick for me, so it might be a start. although you also wrote that post 6 months ago, so you probably fixed it by now ??
Forum: Alpha/Beta/RC
In reply to: What Happened to custom page templates?im having the same problem with 2.7. for some reason the attribute template drop down just isnt there. for no reason. it seems to appear when you change your theme, but that doesnt help on a clients shop site which needs a template to show the cart.
Forum: Themes and Templates
In reply to: Page Templates in WordPress 2.5?!ive been having this problem in 2.7, 2.7.1 as well.
for no reason the template drop down within the “attributes” pane just vanishes on refresh. then a random ammount of time later, on a page refresh, or when the theme is switched, it just comes back.
This would be less of a problem if the bug didnt make the page use the default template for every page untill the template attribute drop down comes back.
i think its short sighted to say that all the people who have had this problem, me included, have bad code(even though the code itself is 5 lines and almost impossible to mess up), when it does it, seemingly at random…. there is a bug within wordpress.
Forum: Everything else WordPress
In reply to: osCommerce for WordPress : WP-osCommercei installed this fine, found the website informative, got stuck in with your wp-osc functions and found that the fatal error:
Fatal error: Call to a member function add_current_page() on a non-object in /home/teros/public_html/blog/store/includes/application_top.php on line 334
was caused by a call to a language module which was being called twice, so i commented it out within the applications_top, thought again and decided that excluding that page was a saver options.
this is a great idea and i hope it works out as wp-commerce is f***ing horrible.