Bootstrap modal popup

If you are using WordPress with a Bootstrap based theme and you are looking for a popup solution to promote offers to your customers, then I have the right plugin for you =)

I just releaste this plugin: http://wordpress.org/plugins/bootstrap-modal-popup

It uses Bootstraps modal component to display a popup with content. The popup can be triggerd on scroll or timeout.

Enjoy!

Oh! And here are some screenshots =)

screenshot-1screenshot-2

 

 

Annonser

WordPress tribe events registration

I was using Tribe Events and need a simple event registration solution (no login, just registration). So I came up with a simpel solution using ”WordPress form manger”. Follow these steps if you want a registration form in singel view for Tribe Events:

  1. Install ”WordPress form manager” https://wordpress.org/plugins/wordpress-form-manager/
  2. Create a form called ”registration-form”
  3. Add the fields you need (name, company, phone etc).
  4. Add a field called ”Event name”
  5. Save your form
  6. Go to the tab ”Form extra”
  7. Give the field ”Event name” the following nickname ”eventname”
  8. Save your form
  9. Open your themes ”style.css” add this rule: .fm-item-eventname { display: none; }
  10. Save
  11. Open your themes ”function.php”
  12. Add the code below, save and you are god to go =)


function add_registration_form () {
echo '<h2>Registration for '. strtolower(get_the_title()) .'</h2>';
echo '<input type="hidden" id="name-of-event" value="'.get_the_title().'" />';
echo do_shortcode('[form registration-form]');
echo '<script>
$ = jQuery;
$(function() {
//-- Read name from hidden field that has been printed before form
$(".fm-item-eventname input").val($("#name-of-event").val());

});
</script>';
}
add_filter('tribe_events_single_event_after_the_content','add_registration_form',1);

WordPress form manager set visitors email as sender

If you are using the plugin form-manager and you want to use the visitors email as sender in the header just follow these steps:

  1. Open up the wordpress admin panel
  2. Go to ”Forms”
  3. Click on your form
  4. Click on the tab ”Form extra”
  5. Type in the nickname ”email” nexto the field that holds the e-mail adress
  6. Save
  7. Go to the tab ”Edit”
  8. To the right under ”E-mail notification” change the field with the header ”from” to: [item email]
  9. Save
  10. Test

If you need any help, just leave a comment on this post and I will tell you how to fix it.

For more shortcodes, checkout the plugin-page: http://www.campbellhoffman.com/question/advanced-e-mail-settings/

WordPress (WP) wp_list_pages returns null

I recently had a problem with wordpress 3.6 and the function wp_list_pages within my template. I know my page had subpages, but when I executed the code the function returned NULL. After doing some digging I found that when wp_list_pages runs, it applys a ”exlcude”-filter, and somewhere on the way this filter added all my pages to it. I tried deactivating all plugins, search all code for the exclude filter funtion and tried another theme but it did not work.

So for now I just added comment marks infront of line 842 in fil ”wp-includes/post-template.php” which temporarly solved the problem.

I know this is the forbidden way so solve it =) so if someone has a better solution, please put it in the comment section.

WP qtranslate custom posts + categories and descriptions + plugin

Just created a plugin that has products and categories for wordpress that needed to be translated. Beacuse of the nice hooks in qtranslate I decided to use it. This is who I fixed it:

In my plugin file I added these lines:

add_filter(‘YOUR-TAXANOMY-NAME,’qtrans_convertURL’);
add_action(YOUR-TAXANOMY-NAME_add_form’, ‘qtrans_modifyTermFormFor’);
add_action(‘YOUR-TAXANOMY-NAME_edit_form’, ‘qtrans_modifyTermFormFor’);
add_filter(‘YOUR-TAXANOMY-NAME’, ‘qtrans_useTermLib’);

That worked great for allmost everything, but it did not solve the translation for the category description. To solve that I needed to wrap the output (in my custom template file) with the following function:

echo _e($term->description, ‘qtranslate’);

Oh, and if you want your break rows back, wrap the description with nl2br:

echo _e(nl2br($term->description), ‘qtranslate’);

 

Comment the post if you need help to get it working =)

 

Make WordPress plugin grid column responsive

Grid columns (http://wordpress.org/extend/plugins/grid-columns) is a great wordpress plugin for using columns. The problem is that it is not responsive. But that is easy to solve. Just add this to you responsive CSS:

@media (max-width: 700px) {
.column-grid .column, .column-grid .column-first, .column-grid .column-last { float: none; }
body .column-grid .column { width: 100%; }

}

”body” can be changed to example ”#container” if you´r using a container div with that id.

”max-width: 700px” can of course be changed to you own width.

WordPress, ”Sorry, you failed the nonce test” update user of multisite

If you get the message ”Sorry, you failed the nonce test” when updating a user of multisite, the problem is that you are trying to do it from the ”Network admin panel” users .

The solution is to go to the admin panel of the specific site that has that user and then go to users and change the password.