Bernhard Riedl
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Display Posts for a specific Tag(s) on a Page?Hi,
First to clarify: As you have chosen tagpages as tag for your thread, it also landed in my plugin’s support section. 😉
Anyway, looking onto the source of
get_postsyou can see the following statement * @uses WP_Query::query() See for more default arguments and information. So you could use get_posts with tag-parameters ofquery_posts.Good luck,
BernyForum: Plugins
In reply to: [TagPages] [Plugin: TagPages] Why not use builtin taxonmy functionality?First of all TagPages uses
register_taxonomy_for_object_typesince its first release.Nevertheless, tag pages in themes will still only include posts. – You could probably call this a bug in WordPress…
Berny
Hi Tim,
Have a look at the Other Notes, section Shortcodes. – Maybe you have just forgotten the brackets […].
For example:
There are [generalstats_count stat=4] pages on my weblog [generalstats_output]Greetz,
BernyForum: Plugins
In reply to: Dave's WordPress Live Search 2.0 dropping WP E-Commerce SupportHi Dave,
Wise decision. I also get many emails of people complaining about conflicts with one of my plugins and another theme or plugin. Over the years I tried to stick as close as possible to the WordPress best practices (e.g. established and popular plugins) utilizing as many core functions as possible. Still it’s very hard to keep-up-to-date with the number of changes to the WP core (especially the tons of undocumented filters and hooks).
Speaking of your 2.0 release there’s maybe a thing I discovered:
I turned on the featured images for posts and went over your source code where I found this:
if(function_exists('get_post_image_id')) { // Support for WP 2.9 post thumbnails $postImageID = get_post_image_id($result->ID);I didn’t find ‘get_post_image_id’ in the current WP code, so I took the code from wp-includes/post-thumbnail-template.php and changed
get_post_image_idtoget_post_thumbnail_idand extended the if to
if (function_exists('has_post_thumbnail') && has_post_thumbnail($result->ID)) {Maybe this is of any use for you. – In addition I wrapped the post-thumbnail into a link in the JavaScript-code. – This makes the search results a bit more accessible.
Greetz,
BernyHi Dave,
You’re welcome. – Thanks for the implementing effort. 🙂
What do you think about my other proposal (no need to generate your JavaScript-file)?
Happy WordPress coding,
BernyNo worries. – A rating would be nice… 🙂
if there was a way to output the results based on the creation date of the content
'orderby' => 'date'which also seems to be the default of get_postsHi Craig,
TagPages enables WordPress with post-tags functionality for pages. In other words, most of the WordPress default functions for tags can be used.
As described in the FAQs you could include a call to the built-in template tag get_the_tags to retrieve the tags associated with a certain page. You could then implement for example get_posts to query for the related posts/pages of the tags-list you’ve retrieved before.
Please note, that WordPress does not store any date information with your tags, though pages have various timestamp fields in the database which you can use for your purpose.
If you don’t like to do this by hand, I’m pretty sure there are some plugins out there which you can combine…
greetz,
BernyHi Dave,
Thanks again for your plugin, I just wanted to contributed two thoughts to your performance discussion:
I’m using this technique in my plugins to hand over parameters to my JavaScript code.
Thus, I can use static JavaScript-files which get cached and can be gzipped – maybe you want to have a look.Another thought that might decrease your code-base whilst enhancing the flexibility at the same time (about performance I’m not sure, but might also be better, because the WP guys have optimized it) would be to use wp_ajax-hooks instead of your own bootstrap.
Greetz,
BernyForum: Plugins
In reply to: [SensitiveTagCloud] [Plugin: SensitiveTagCloud] WordPress 3.1 ChangesHmm, this could also be a bug in WordPress 3.1-RC2 rather than a permanent change.
Forum: Fixing WordPress
In reply to: GeneralStats PluginHi Fred,
As it seems that you have successfully installed GeneralStats and activated the option Enable Dashboard Widget in the section Dashboard of the Settings Menu (did you click on Save Changes?), you probably have to tick GeneralStats in the dashboard. Have a look at this post for a screenshot.
Greetz,
BernyForum: Plugins
In reply to: [TagPages] [Plugin: TagPages] How to sort tagsHi Benna,
Hmm, I’m still not a 100% sure, but I’ve tried to rework your example.
Querying for the tags on a page can be done with wp_get_post_tags (in wp-includes/post.php) which calls wp_get_object_terms (in wp-includes/taxonomy.php).
As you’ve installed TagPages (in most cases) you can use the post-functions also for pages, because TagPages extends WordPress by using the same ‘Post-Tags’ taxonomy for pages which you would normally only use for posts.
<?php global $post; //inserisco gli sport adatti per il prodotto in questione $tags = wp_get_post_tags($post->ID, array('orderby' => 'name', 'order' => 'DESC')); if (count($tags)) { ?> <h5><span>Sport</span></h5> <ul class="sport-list"> <?php foreach($tags as $tag) { echo '<li class="tag-'.$tag->slug.'"><a href="'.get_bloginfo('wpurl').'/sport/'.$tag->slug.'/"><img src="'.get_bloginfo('stylesheet_directory').'/timthumb.php?src=wp-content/uploads/sport/'.$tag->slug.'.png&h=100&w=85&zc=1" alt="'.$tag->name.'" /></a></li>'; } ?> </ul> <?php }As you see, I’ve used a reversed alphabetical order to output the tags…
Hope that helps.
Greetz,
BernyForum: Plugins
In reply to: [TagPages] [Plugin: TagPages] How to sort tagsSorry, Benna, I don’t understand your question. – What do you mean by ‘add a score to order this list, like pages, but also in alphabetical mode’?
Can you give me an example?
Forum: Plugins
In reply to: [TagPages] [Plugin: TagPages] How to sort tagsHi Benna84,
TagPages extends the default WordPress functionality, thus all built-in WordPress functions can be used to sort your tags in the front- and backend. In other words you can implement the same template tags which you use to sort your post-tags.
Have a look at the TagPages Faq for a few links.
Greetz,
BernyForum: Plugins
In reply to: [TagPages] [Plugin: TagPages] Probem with tag-editing in quickedit?Hi Martin,
Good you figured out the incompatibility.
Maybe nerrad could have a look into things, there have probably been some changes with WordPress 3.0 and the new taxonomy-functions…
Greetz,
Berny