pimschaaf
Forum Replies Created
-
Forum: Plugins
In reply to: [Better archives widget] Post countThe widget function in widget-archives.php:43 gets the post count as a result from the query (on line 59).
You could do the following:
<li class="baw-month"><a href="<?php echo get_month_link( $month->year, $month->numMonth ); ?>"><?php echo $month->month; ?><?php echo ' ' . $month->year; ?> (<?php echo $month->post_count; ?>)</a></li>
I’ve added the following in the above snippet:
(<?php echo $month->post_count; ?>)
which will output the post count in parentheses for each month.
Forum: Plugins
In reply to: [FV Top Level Categories] Compatibility with WPMLI’ve been testing this plugin (v1.6) against WPML 3.1.9.4. It seems this version of WPML cannot figure out translations of categories when the category base is stripped. E.g.:
I have /category/dagen (dutch) and /category/days (english).
Stripping the category base causes WPML to generate rewrite rules for either ‘dagen’ or ‘days’ (it seems to be depending on the language on the first call after the rewrite rule flush). The missing set of rewrite rules for the translated branch results in 404 errors for the permalinks.
Turning off the plugin resets the rewrite rules to a state where no specific category slugs are present in the set of rules.
Similar experiences with other plugins that strip the category base make me suspect WPML now requires the base to be present. E.g. WP No Category Base – WPML compatible 1.1.0 (outdated) worked fine with WPML 3.1.4.
Using
/%postname%/
as permalink setting.References:
https://www.ads-software.com/plugins/no-category-base-wpml
https://wpml.orgForum: Plugins
In reply to: [Force Featured Image] Does not work with WordPress 4.0I’ll see about testing it Jonathan, sorry for not getting back at you sooner. Thanks for putting in the effort of updating the plugin!
Forum: Plugins
In reply to: [Multi Twitter Stream] Showing Random Number Above Tweets@yogesh Singh comment out the line that says
echo $length
i.e. the last line in my previous comment.
like:
//echo $length;
Forum: Plugins
In reply to: [Multi Twitter Stream] Showing Random Number Above TweetsThere’s a rogue echo on line 273 in widget.php that echoes the value of $length:
$str = file_get_contents($cFile); $content = unserialize($str); $length = count($content); echo $length;
Forum: Plugins
In reply to: [Simply Instagram] [Plugin: Simply Instagram] Fatal ErrorI get this error when testing on localhost. While I can authorize, the widget does not work.
rollybueno posted 7 months ago:
the instagram server can’t communicate with your site
Why is bidirectional communication required? As I see it, I only have to
POST
andGET
to authorize and retrieve the images from the Instagram servers?Negative, this will only filter media (post-type: attachment) based on category as it does for post-type: post, and that only on the pages included $pages.
+1
Do note that you can more or less implement category based filtering for media with https://www.ads-software.com/support/plugin/media-categories-2
For this I’ve edited my copy of the plugin. In restrict-categories.php:456 I’ve replaced the code with:
$pages = array( 'edit.php', 'post-new.php', 'post.php', 'admin-ajax.php' );
adding
, 'admin-ajax.php'
to enable filtering of the query that is done for the media modal through the WP AJAX interface.
Forum: Plugins
In reply to: [Media Categories] Default to uncategorizedInstead of my previous code for line 140:
if (!get_the_category($post->ID)) { wp_set_object_terms($post->ID, 1, 'category'); $selected_cats = array(1); } else { foreach (get_the_category($post->ID) as $category) { $selected_cats[] = $category->cat_ID; } }
this saves the default category term 1 (Uncategorized) for Uncategorized posts. Do note that this does not support custom taxonomy.
Forum: Plugins
In reply to: [Media Categories] Default to uncategorizedI’ve made the following changes to my copy of the plugin, in absence of a filter. All are in media-categories.php
Added to media_categories_meta_box() (line 140):
if (!get_the_category($post->ID)) { $selected_cats = array(1); } else { foreach (get_the_category($post->ID) as $category) { $selected_cats[] = $category->cat_ID; } }
and added ‘selected_cats’ => $selected_cats to line 176 as follows:
<?php wp_terms_checklist($post->ID, array('taxonomy' => $taxonomy, 'selected_cats' => $selected_cats, 'popular_cats' => $popular_ids, 'walker' => $custom_walker)) ?>
This succesfully checks the checkbox for the Uncategorized category, when no other category is selected. However, so far, this is only a visual effect and not saved to the database.
Thanks Herman,
A nice addition to this great plugin. I’m planning to use it in combination with the Options Framework plugin (https://wptheming.com/options-framework-plugin)
https://example.org/?json=options.get_options&options=optionsframework,name
works straight out of the box.
Cheers
Forum: Plugins
In reply to: Tubepress – Video thumbnails not loading consistantly in Chrome and SafariGreat ?? happy to help!
Forum: Plugins
In reply to: Tubepress – Video thumbnails not loading consistantly in Chrome and SafariCool ??
Forum: Plugins
In reply to: Tubepress – Video thumbnails not loading consistantly in Chrome and SafariI had exactly the described issue with Tubepress version 2.2.7 in Chrome and Safari on https://tinyurl.com/3rl82f7.
On first visit and refresh the thumbs did not properly load. The HTML nodes were there, even including the image, though somehow the width on the thumb wrapper was set to 0px (as shown below), which caused the images to appear to be invisible/not there.
<div class=”tubepress_thumb” style=”width: 0px; “>
Fixed by setting a width for the thumbs in CSS, adding the !important rule to overwrite the set 0px width (which I think is calculated somewhere in the Tubepress plugin) like so:
.tubepress_thumb {width: 130px !important;}
Cheers
P.S.: Jeff, have you managed to find a(nother) solution to this problem? I can’t seem to reproduce the problem on your site, although the link you posted goes 404.