Matthew Muro
  • Member for 11 years, 2 months
  • Last seen more than 7 years ago
WordPress Plugin Development - Headers Already Sent Message
13 votes

This is typically caused by spaces or new lines before the opening <?php tag or after the closing ?> tag. Check out this page to see some solutions: How do I solve the Headers already sent ...

View answer
What is the difference between a "tag" and a "category"?
Accepted answer
5 votes

Aside from the technical aspects, Categories are for broad topics while Tags are for adding more detail to your posts' subject. Lorelle has written the definitive guide on the difference between ...

View answer
Extending WP's upload/insert media functionality
Accepted answer
4 votes

Both of these are possible. Insert Attachment into Media Library By using the wp_insert_attachment function, you can insert your uploaded images to the Media Library. This is the example code from ...

View answer
Make Custom Field Into A Link On The Front End?
Accepted answer
4 votes

This is better accomplished by registering a new taxonomy. You get all of the advantages of categories and tags without the hassle of custom fields. Codex: register_taxonomy Tutorial: How to Create ...

View answer
I Want to Get A Plugin Version Number Dynamically
Accepted answer
3 votes

Here is an answer with some code that will do what you want it to do: Is there a way for a plug-in to get it's own version number?

View answer
Settings options not showing up on Sub Menu page in WordPress plugin
1 votes

If you check the arguments for add_menu_page, you'll see that the fifth argument is your callback function. And, right now, there's nothing in the mj_admin function. What you need to do is output ...

View answer
My plugin does not install correctly if a previous version is still installed
1 votes

Quick and easy. if ( is_plugin_active( 'plugin-folder-name/main-plugin-file.php' ) ) deactivate_plugins( '/plugin-folder-name/main-plugin-file.php' ); It's important to note the is_plugin_active ...

View answer
How to automatically activate a plugin on install
1 votes

You need to reference the correct path in order for WordPress to know what to activate. For activate_plugin, it should be activate_plugin( 'plugin-name-folder/plugin-name.php' );. For ...

View answer
Exclude category to "the_breadcrumb" functions
1 votes

You should use get_categories. It supports an exclude argument.

View answer
Convert Wordpress.com embed links to normal embeds
1 votes

There's a few ways that I can think of Find a plugin that is compatible with that shortcode format Write your own plugin that uses the existing shortcode format from WordPress.com (which I don't ...

View answer
Wordpress plugin form not saving data
1 votes

I recommend checking out the tutorial by Ozh on Handling Plugin Options with register_setting. Utilizing the Settings API is by far the easiest way to deal with plugin options.

View answer
How can I grant capabilities directly to users (not roles) in wp-admin?
1 votes

Capabilities are permissions for roles. Those roles are then extended to the users, which determines what a user can do. The reason you use roles is to avoid managing permissions per user. The best ...

View answer
Sample code for validating custom metabox?
1 votes

To properly validate input, you will need to use a combination of Javascript and PHP. I highly recommend using the jQuery Validation plugin: http://docs.jquery.com/Plugins/Validation. It will let you ...

View answer
What is a short code?
1 votes

These are WordPress.com specific shortcodes, but they give you an idea of the power of using them.

View answer
WordPress - using sessions?
1 votes

It's probably better to add your session_start(); to the top of your header.php file if you're planning to use it in your theme. If you are wanting to use a session in the admin, I'd recommend either ...

View answer
The holy grail of Event Management Plugins?
Accepted answer
1 votes

Unfortunately, there's really nothing out there that's going to solve all of your problems out of the box. Whatever calender solution you choose will require some amount of customization. The one ...

View answer
External Link issue in Visual Form Builder Pro
0 votes

You aren't doing anything wrong. This was a bug affecting descriptions that's been fixed in version 2.2.1. Here are the release notes.

View answer
Load jquery only for certain pages in the backend
Accepted answer
0 votes

add_options_page returns the same value as add_submenu_page and can be used in exactly the same way as the code you posted. This will load your scripts only on that page. You can also request the ...

View answer
Can I install/embed Wordpress on a 'single page'?
0 votes

It's a lot easier than you might think. Simply install WordPress into the /blog/ folder. It will not affect the rest of your site.

View answer
Cannot strip JW Player shortcode?
0 votes

There's a function on the Codex page for strip_shortcodes that does what you need: function remove_shortcode_from_index($content) { if ( is_home() ) { $content = strip_shortcodes( $content ); ...

View answer
Custom Archive Page
Accepted answer
0 votes

I highly recommend checking out the Smart Archives Reloaded plugin. It has several formats and one of them, called "fancy", displays things very similar to what you described.

View answer
Plugin directory "Last Updated" not changed after initial commit?
0 votes

Based on the comment discussion in the question, I believe we have an answer to this. Saving the readme.txt file with Unicode-8 (UTF-8) encoding seems to correct the 'Last Updated' problem.

View answer
append stylesheet via shortcode
0 votes

If you add your stylesheet via wp_head, your styles will be applied just fine. This works for one of my plugins: add_action( 'wp_head', 'my_custom_css' ); function my_custom_css(){ echo ...

View answer
How do I "trash" a custom post type post while logged in as Admin
0 votes

I wrote a tutorial on how to properly apply capabilities with the Members plugin for CPTs. The gist is to make sure you have all of the proper caps, not just the delete_ cap.

View answer
Frontend Post Form Validation
Accepted answer
0 votes

The best way to do form validation is with a combination of JavaScript and PHP. The reason why you want to perform JavaScript validation is to give the users a chance to correct their errors without ...

View answer
Possible to filter the posts or categories that XML-RPC users see in their mobile application?
Accepted answer
0 votes

Okay, so I discovered the answer to my question. It is possible to filter the posts and categories that users see in their XML-RPC application. The pre_get_posts and list_terms_exclusions filters ...

View answer