Tag Info

Hot answers tagged

6

The first thing to remember about the post editing screen is that everything (except for the post title, editors, permalink, etc.) is a meta box. Since you can easily add and remove meta boxes, there's no need for CSS and JS hacking. Don't want the standard post format to show up? Remove the default meta box and roll your own. First hook into ...


4

Your theme must indicate that it supports post thumbnails: if ( function_exists('add_theme_support') ) { add_theme_support('post-thumbnails'); // If not the standard size, state your size too set_post_thumbnail_size( 200, 200, false ); }


4

This will get you most of the way there, but the actual search is not perfect. It would be great if someone who knows more about $wpdb can help get a better result. If this is my original post title: SOPA is dead, woot! Then just a title of "SOPA" will find it, as will just a title of "is dead" but not "Ding dong, the witch is dead" or "SOPA is a bad ...


3

function add_featured_image_url($output) { global $post; if ( has_post_thumbnail( $post->ID ) ){ $output = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ) . ' ' . $output; } return $output; } add_filter('the_excerpt_rss', 'add_featured_image_url'); add_filter('the_content_feed', 'add_featured_image_url');


2

Unless you encode your code, you can't protect a plugin that bundles both versions but works differently based on... settings. Maybe amateurs will consider this a roadblock but I'll hack it viciously in a couple of minutes and unlock everything (that'll never happen as I write all my plugins... just sayin'). Only way to do it is by encoding the plugin code ...


2

You alluded to this in your comments, one way is to provide an API key for your plugin, that way your clients are actually paying for support and updates and not code, it's really one of the only decent ways to go about this. For example if their API key is not valid or expires they do not get access to your private forum or any plugin updates ( you would ...


2

Based on your comment: Because if something ends up in that format, the templating will come out wrong(to varying degree depending how customized the other formats are), and there's no good way to determine that without visiting every single post and just knowing it's supposed to be in some other format. There's also no reason to template standard at ...


2

You can try something like this: <!-- The Post Thumbnail function is active by default, but this line of php will make it display.--> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" target="_blank"><?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { ...


2

You have to use the correct handle: wp_localize_script('page_data', 'glr_dt', $gallery_js_data_array); // Edit Your code is also wrong. What do you want to do in this line: 'maxPages' => '$gallery_max_load = $gallery->max_num_pages;' You are assigning a string to maxPages. I guess you want it that way (or similar): 'maxPages' => ...


1

It's impossible to do not being Google. Can you imagine the amount of crawling and parsing you have to do with each post? There is 61 million blogs using Wordpress, 91 million using Tumblr, more than two millions of posts daily. Try to use Google Alerts and use a quoted unique piece of your content as query.


1

The Summy: Excerpt Extraction WordPress plugin has well documented code to use the Sum+my algorithms. Instead of looking for a solution that is already used in WordPress, you might find more solutions by searching for PHP solutions that summarize articles and then integrating them into WordPress. WordPress provides a filter that can be used to edit the ...


1

This is a semi-hacky workaround, but I think it meets all your needs. First, implement the template logic to handle the case where for some reason you do have a post that is set as the "Standard" post format. $format = get_post_format(); if ( false === $format ) // post format is 'standard' $format = 'aside'; // set it instead to 'aside' (or whatever ...


1

The easiest way is to use the plugin TinyMCE Advanced. Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor. In its configuration page (Settings > TinyMCE Advanced), you'll find this option: That option will convert the pop-up window of the "Insert/Edit Link" button into this:


1

Since I don't know the complete scope of the project I can only give a suggestion on what I would do. Since you will be using a page for placing the 3 images with title and excerpt, I'd create a custom page template that has two loops. The first loop would use query_posts to bring in the 3 images (title, and excerpt). I would then use a second loop to show ...


1

To set the height and width of the_post_thumbnail use the following: the_post_thumbnail( array(height,width)) Where it would show in code like this: if ( has_post_thumbnail() ) the_post_thumbnail( array(200,999)) More Info on Post Thumbnails


1

Are you talking about the hovercards for gravatar users? It's available on WP.com, not for self-install sites. However, there's a fairly easy hack to get it working anywhere. See this article: http://ottopress.com/2010/gravatar-hovercards/



Only top voted, non community-wiki answers of a minimum length are eligible