Still Having problems setting description length
This topic contains 16 replies, has 3 voices, and was last updated by purpleedge 10 years, 4 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
June 25, 2014 at 8:56 pm #6181
Hi,
@Vikas, I don’t want to beat a dead horse but after following your instructions I still have not been able to solve this Description length issue.
Per another thread from the other day you had said:
In new updates the description length options have been provided in widget setting, so plz set it as per ur wish.
Description length is controlled by 3 parameters in hierarchical.
1. Option in widget setting
2. Geodirectory > Design > Listing tab > Description word limit
3. WordPress default excerpt lenghtso if 1st is not defined then 2nd is used and so on.
1. I am not using a widget for showing the listings
2. I have tried using 10 words and 100 words (just for testing) in
Design>listing tab> word limit— No effectWhatever I do, the length varies. I just want to keep the description the
same length as my photos when showing the listings of a particular CPT.I just go to my top menu, select Full,basic,affiliate or channel partner and
view my listings.My pictures are just temporary right now, usually only 150×150, so I created a test listing for a basic member with a 960×425 photo for our golf tournament just in case the description is OK and the photos have been too small. That apparently wasn’t the case.
Site credentials if needed:Thanks for your help
June 25, 2014 at 8:57 pm #6182This reply has been marked as private.June 26, 2014 at 2:24 am #6218Hi,
As a hot fix.
Plz search ‘function geodir_excerpt_length’ in ur geodirectory > geodirectory-functions > post_functions.php, it should be around at line no. 1889.Replace that function with below code.
function geodir_excerpt_length($length) { global $wp_query; if(isset($wp_query->query_vars['is_geodir_loop']) && $wp_query->query_vars['is_geodir_loop'] && get_option('geodir_desc_word_limit')) $length = get_option('geodir_desc_word_limit'); elseif(get_query_var('excerpt_length')) $length = get_query_var('excerpt_length'); if(geodir_is_page('author') && get_option('geodir_author_desc_word_limit')) $length = get_option('geodir_author_desc_word_limit'); return $length; }
Please advise ?
June 26, 2014 at 3:25 am #6219Thanks but that didn’t work for me.
I did it twice to make sure. I named the old file just in case I need to put it back.
But, that was approaching the edge of my editing capability.
I set the length to 10 in Design/listing as a test
June 26, 2014 at 3:33 am #6220Here’s a snip of what I did,
June 26, 2014 at 7:50 am #6235Hi,
Send me site ftp in private reply please.
Thanks
June 26, 2014 at 11:30 am #6246This reply has been marked as private.June 26, 2014 at 1:55 pm #6260Hi,
I checked and found that everything is fine at GD end, so may be its due to WP total cache plugin u have actived there. Please try to deactivate it and check.
Thanks
June 26, 2014 at 3:00 pm #6264I have completely uninstalled and no help.
On that subject, since it may not be the cause, what do you think about
the usefulness of that plugin. It was recommended by Hostgator on their site, not
just from a tech.Should I uninstall all my plugins with the exception of GD and addons?
June 28, 2014 at 5:15 pm #6623deactivated all other programs, still the same problem.
June 30, 2014 at 2:53 pm #6817Hi,
I have fixed this issue, i found that Avada theme also has a filter on excerpt_length hook.
I wanted to put this codeadd_action('init' , 'geodir_remove_excerpt_lenght_filter') ; function geodir_remove_excerpt_lenght_filter() { remove_filter('excerpt_length' , 'avada_excerpt_length', 999); }
in your avada child theme functions.php file, but came to know that u are not using that, so i put it in geodirectory(core)/geodir_hook_actions.php.
But this will get overwritten with next release because this is specific to avada theme. I will consider it as Avada theme compatibility issue and put this solution in Avada child theme later.Please advise ?
June 30, 2014 at 4:52 pm #6829Thanks, What is the proper way to activate my child theme? Do I deactivate my current Avada theme first, then Activate the child theme. Anything I have to reconfigure after that?
I will then place the code where it should go,
Thanks for the effort.
June 30, 2014 at 7:58 pm #6862Well, the description length works regarding the ‘read more’ coming after the
correct number selected in ‘Design>Listings. When i chose 10 words it shows ten words, etc.But, The character length problem in using the GD popular post view in The GD bottom listing area is affected.I have another post concerning a problem where the character length is not correct using this GD popular post view.(Before this word count fix today) I have the character count set at 500, yet it shows about 10 words. If I change it to 800 Characters it shows about 30 words.
If I change the word count (that you just successfully fixed) in the details>listing area, It changes the word count/ Characters in the GD Popular post.
Thanks,
July 16, 2014 at 9:10 pm #8733Sorry, still having problems with the character count in ‘gd bottom listing’. I now have your new AVADA child theme installed and I believe I placed the file correctly in the style.css file.
I have the character count set for 2000 and it’s not even close to showing the full text.Am I doing something wrong?
July 17, 2014 at 12:57 am #8750GD is printing the excerpt, not the content.
You can change the length of the excerpt by adding this to your functions.php file…
// Change the number of words contained in an excerpt to 300
function custom_excerpt_length( $length ) {
return 300;
}
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );This should ensure that the number of characters in the excerpt is greater than your desired character count.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket