DP limit listing length https://www.premiumpress.com/forums/topic/dp-limit-listing-length/feed/ Thu, 11 Sep 2025 16:32:24 +0000 https://bbpress.org/?v=2.6.4 en-US https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1221 <![CDATA[DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1221 Sat, 06 Jul 2013 09:23:42 +0000 Carlo Hi, is it possible to limit the length of a listing by setting max character count?

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1406 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1406 Sun, 07 Jul 2013 12:44:00 +0000 James Hi Carlo,

There are ways to do that. Here is an example of code to limit the short description field:

[code title=””]<?php
/* ================= Added By DeLime . Set length of Short Description Field*/
if($dfs[‘excerpt’] != “1”){ ?>
var short = document.getElementById(“form_short”);
if(short.value.length > 300){
alert(‘There are too many characters in the Short Description field. You currently have ‘ + short.value.length + ‘ and the limit is 300.’);
short.style.border = ‘thin solid red’;
short.focus();
return false;
}
<?php }
/* ================= End Added By DeLime . Set length of Short Description Field*/
?>[/code]

It would go at around line 1152 in _tpl_add.php in the child theme.

Jim

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1417 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1417 Sun, 07 Jul 2013 13:21:37 +0000 thanks for share

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1431 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1431 Sun, 07 Jul 2013 14:43:19 +0000 Mark Fail Thanks for sharing Jim

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1644 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1644 Mon, 08 Jul 2013 17:54:27 +0000 Michael The above code gives an error:

Parse error: syntax error, unexpected ‘<‘ in /home/gorod/public_html/wp-content/themes/directorypress/tpl-add.php on line 1153

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1661 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1661 Mon, 08 Jul 2013 19:21:54 +0000 Michal you are probably missing or more likely have to many “<” signs
make sure line looks like this one

</div> <!– end itembox –>

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1670 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-1670 Mon, 08 Jul 2013 20:42:18 +0000 James Michael,

Pleae be sure the code is pasting in correctly and that all characters are there.

And I notice that you are placing it into tpl-add.php … a core theme file … and not _tpl_add.php in your child theme. That will alter where the code is placed.

And if it still gives you trouble, please show us where you are pasting it.

Jim

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-3315 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-3315 Wed, 17 Jul 2013 02:02:46 +0000 Mark Plug in that does it:

Limit Press- Limit Characters on Submission in DirectoryPress

]]>
https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-3327 <![CDATA[Reply To: DP limit listing length]]> https://www.premiumpress.com/forums/topic/dp-limit-listing-length/#post-3327 Wed, 17 Jul 2013 02:32:19 +0000 Mark Fail thanks Mark, i see you’ve been busy 🙂

]]>