fitztrev
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Cutting the content…Yes, you can use strip_tags().
Forum: Developing with WordPress
In reply to: Cutting the content…explode
maybe? This is quick and gets the job done.<?php $blah = exlode( '</p>', get_the_content(), 2 ) echo $blah[0] . '</p>'; ?>
Forum: Developing with WordPress
In reply to: wp_insert_post() only creates ‘draft’ no ‘publish’ postsNot sure about the error, but you can pass wp_insert_post ‘post_status’ = ‘publish’ to get it to publish the post. It defaults to draft so you have to specify the status yourself.
Forum: Fixing WordPress
In reply to: Odd 2.3.2 Delete Post behaviorI just ran into the same problem as described above. The
delete_post
hook works fine if deleting from the edit post page, but not the Manage page, where deletes are handled via AJAX.The given solution does not work in 2.5-bleeding. I’ve spent over an hour trying to resolve it but no luck.
Forum: Plugins
In reply to: Prepopulate the Write Post Form?jQuery can do that. Add an onclick event to a button that you place on the Write Post page that will populate the values of all the input fields.
Forum: Plugins
In reply to: Load a plugin only on specific pages?harknell is correct. You’ll need to add a conditional statement to the plugin somewhere.
if ( is_page('contact') ) { // load css and js }
Forum: Plugins
In reply to: change $WP_querywp-includes/query.php
I’m not sure if I fully understand, but maybe you can use extends? https://us2.php.net/manual/en/keyword.extends.php
Forum: Plugins
In reply to: HELP ON CODES: Writng a new pluginWell first off you need a little patience.
Second, you need to preg_match before performing the sql query.
$VALUE = '$1';
will literally have the value of$1
.Forum: Plugins
In reply to: extract exifWP 2.4 can do this with no plugin. It will soon be in the core.
Forum: Fixing WordPress
In reply to: Putting two php arguments in one line of code ..Use an ampersand:
wp_list_pages(‘exclude=2&title_li=’);
Forum: Fixing WordPress
In reply to: 2 WordPress Installs on one domain – How do I…Forum: Plugins
In reply to: Upload Images to Commentsimagiscapeca:
>>Does your plugin allow users to include text and links along with the image?
Yes.
>>Does your plugin allow users to include more than one image?
Yes.
>>Still, it would be nice if users could just copy and paste multiple items including images and video and links and formatted text. Why is that not possible?
Because the comment form is not a rich text editor. It will only accept plain text.
Forum: Plugins
In reply to: i need this plugin.No plugin is necessary to do that. You can use custom fields: https://codex.www.ads-software.com/Using_Custom_Fields
If you name the field “download_link”, you can do it like this…
In your template (single.php), add this code where you want the download link to appear (but it must be within The Loop):
<a href="<?php echo get_post_custom_values('download_link'); ?>">Download Now</a>
Forum: Plugins
In reply to: Upload Images to CommentsI just made the plugin a little easier for your visitors.
When a commenter wants to add an image, she clicks a link and a window pops up prompting her for the URL.
This gets around the issue of the visitor having to use any markup code.
Hope it helps.
Forum: Plugins
In reply to: Upload Images to CommentsI just created a plugin that allows for comment image embedding with no core code modifications. ??
https://www.trevorfitzgerald.com/projects/wordpress-comment-images