LaTex MarkUp – align equations

As mentioned, WordPress does not provide general LaTeX support, but usually only mathmode support. Thus you have to use something that works from within mathmode, and not its own environemnt. In this case, there is a very useful one called ‘aligned’ (with the ‘ed’ at the end). To render the above in your default WordPress.com … Read more

Advice on naming files for a plugin

There’s certainly no need to name plugin files with prefixes (although some plugin authors like to do this). I suspect the advice you read was referring to functions within your plugin files. Structuring you plugin folders as you suggest (using a class folder) is fine. See this link for more information on writing plugins: http://codex.wordpress.org/Writing_a_Plugin … Read more

How to make simply “report” button on posts

Basically, you filter ‘the_content’ and add a button. Okay, it might be slightly more complicated: You need to send a mail per wp_mail(). You need some spam protection: a hidden text field which should stay blank and a nonce field. You may want to restrict the pages where the button form will be displayed: On … Read more

Redirect to settings page after install

Register an activation hook and then redirect the user’s browser when you’re done installing your plugin. function myplugin_activate() { // TODO: Install your plugin here. // I don’t know of any other redirect function, so this’ll have to do. wp_redirect(admin_url(‘options-general.php?page=myplugin_settings’)); // You could use a header(sprintf(‘Location: %s’, admin_url(…)); here instead too. } register_activation_hook(__FILE__, ‘myplugin_activate’);

how to include other plugins css files in a shortcode?

I think you could get around this by pre-running the shortcodes on the page by applying the content filters before the header is output. This should allow any internal shortcodes run inside the included post to add any action hooks properly and thus any needed stylesheets/resources. add_action(‘wp_loaded’,’maybe_prerun_shortcodes’); function maybe_prerun_shortcodes() { if (is_page()) { global $post; … Read more

Use a plugin to handle custom post types?

Hi @Grant Palin: The register_post_type() function is really agnostic to theme or plugin; you can use it in an ‘init’ hook in either place, it really depends on what you are trying to accomplish. For example, if I’m setting up a custom site for a specific client I’ll probably just register the post types in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)