Forum Replies Created

Viewing 15 Topics - 1 through 15 (of 17 total)
Author Posts
May 9, 2014 at 9:22 pm in reply to: Front end add project not working 20217
Tom Tom

You’re welcome. Hope it helps others. Sorry for leading you on wild goose chase 😉

May 7, 2014 at 10:49 pm in reply to: Front end add project not working 20094
Tom Tom

I’ll add something to this…many people need the p tag filter or their theme is messed with by the empty Ps inserted by WordPress. I just tried a different filter in functions.php instead of the one above. Fixes empty p tag in theme, doesn’t mess with “+” create project in WP Project Manager Front End plugin:


add_filter('the_content', 'remove_empty_p', 20, 1);
function remove_empty_p($content){
    $content = force_balance_tags($content);
    return preg_replace('#\s*+(<br\s*/*>)?\s*
#i', '', $content);
}
May 7, 2014 at 10:38 pm in reply to: Front end add project not working 20091
Tom Tom

Resolved!

It was the actual filter itself breaking create project functionality in the frontend plugin. The following filter is recommended by the Inceptio theme developer to remove empty p tags inserted by WordPress. There are other such filters out there so beware adding them. They may clean up empty Ps content but can also break plugins.

————————-

Beware: adding empty p tag strippers, such as below, can break the wp front end plugin.

remove_filter( ‘the_content’, ‘wpautop’ );
add_filter( ‘the_content’, ‘wpautop’ , 99);
add_filter( ‘the_content’, ‘shortcode_unautop’, 100);
add_filter(‘the_content’, ‘inc_shortcode_format’, 101);
if (!function_exists(‘inc_shortcode_format’)) {
function inc_shortcode_format($content)
{
$content = preg_replace(‘/(
)\s*(< )/', '<', $content); $content = preg_replace('/()\s*()\s*(< \/p>)/’, ‘‘, $content);
return $content;
}
}

Thanks for your help on this, Nizam.

May 7, 2014 at 10:29 pm in reply to: Front end add project not working 20087
Tom Tom This reply has been marked as private.
May 6, 2014 at 10:39 pm in reply to: Front end add project not working 19999
Tom Tom

Nizam…the extra p is only being inserted in the wppm shortcode. In the theme documentation, developer suggests adding the following filter to remove extra p inserted in shortcodes by WordPress. I did this months ago and it works for all the theme shortcodes but does not effect wppm.

remove_filter( ‘the_content’, ‘wpautop’ );
add_filter( ‘the_content’, ‘wpautop’ , 99);
add_filter( ‘the_content’, ‘shortcode_unautop’, 100);
add_filter(‘the_content’, ‘inc_shortcode_format’, 101);
if (!function_exists(‘inc_shortcode_format’)) {
function inc_shortcode_format($content)
{
$content = preg_replace(‘/(
)\s*(< )/', '<', $content); $content = preg_replace('/(

)\s*(

‘, $content);
return $content;
}
}

May 6, 2014 at 10:17 pm in reply to: Front end add project not working 19995
Tom Tom This reply has been marked as private.
May 6, 2014 at 10:16 pm in reply to: Front end add project not working 19994
Tom Tom This reply has been marked as private.
May 5, 2014 at 8:20 pm in reply to: Front end add project not working 19926
Tom Tom This reply has been marked as private.
May 1, 2014 at 8:08 pm in reply to: Front end add project not working 19771
Tom Tom

Thank you Nizam.

April 30, 2014 at 8:48 pm in reply to: Front end add project not working 19721
Tom Tom

Hi Nizam. I did try with 2014 and it does work. (read my previous message please).

There must be a way to debug if there is a conflict? Certainly not everyone wants to use WordPress’s 2012 or 2014. Any suggestions? Thanks.

April 30, 2014 at 4:57 am in reply to: Front end add project not working 19672
Tom Tom This reply has been marked as private.
April 29, 2014 at 10:33 pm in reply to: Front end add project not working 19659
Tom Tom

It does work with 2014 theme activated. I disabled all plugins in the theme I’m using and it still didn’t work.

When I check in Firebug, and click the “+” sign to add a project, Firebug shows me a JQuery error (line 2) in jquery.js (version 1.11.0). Don’t know whether this is your script or the theme’s jquery.

“Error: cannot call methods on dialog prior to initialization; attempted to call method ‘open'”

April 29, 2014 at 9:59 pm in reply to: Front end add project not working 19658
Tom Tom

I’ll check it with plugins deactivated. I’ll let you know. thanks.

Tom Tom

Thanks Nizam.

Tom Tom

Ahh…you are fast. *That’s* why it worked! Thanks Nizam.

How about the Invoice add-on?

Viewing 15 Topics - 1 through 15 (of 17 total)