• So going to my funcitons file, I found this which allows me to change excpert lenght in post preview BUT on different resolution displays posts are displayed differenatly therefore on lower resolution displays, some of the text from the text preview goes all the way to the bottom of the post preview and looks really ugly. So here is the code:

    //Custom Excerpt Length
    function optimizer_excerptlength_teaser($length) {
        return 30;
    }
    function optimizer_excerptlength_index($length) {
        return 12;
    }
    function optimizer_excerptmore($more) {
        return '...';
    }

    In order to change the NUMBER OF WORDS in post preview , all I have to do is change that first number that is set to 30 BUT I dont know to change the number of words. I would like to make the preview text lenght in % . Problem is that I have no idea since I know very little about PHP , I can understand it but not write it. For example i want something like this:
    $length = 30% of the post box height or something like that which would let me maniuplate it so it looks good on all screens. Is it possible and if so , can you help me ?

    Reply

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Excerpt Length Question (must know php )’ is closed to new replies.