• Hi everybody!
    first of all, sorry for my poor english!

    i like Hypebeast.com home page style very much, and i have tried to create a page like that, but i came up against some questions.

    Q1, Hypebeast use ‘the_content’ or ‘the_excerpt’?
    i have tried to use ‘the_content’, but i have no idea how to put three dots on the content finality(before read more link)? could i put the ‘read more’ tags in the_excerpt?
    btw: i have put the php code in index.php to replace some tags like <p> and <img> from the_content, it’s discommodiously? did you have some better solutions for this?

    Q2, Thumbnails
    Get the first image from post content or unique custom field?

    Q3, Some template’s frameworks are fit Hypebeast framework perfectly?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kinglu

    (@kinglu)

    php code for replace <p> and <img> tags below:

    <?php
       ob_start();
       the_content('more',true);
       $patterns[1] = '/<img[^>]+./';
       $patterns[2] = '/<p[^>]+./';
       $replacements[2] = '';
       $replacements[1] = '';
       $postOutput = preg_replace($patterns, $replacements, ob_get_contents());
       ob_end_clean();
       echo $postOutput;
    ?>

    but only one </p> tag leave over, i have no idea where is wrong.

    Thread Starter kinglu

    (@kinglu)

    use ‘the_excerpt’ and DIY a more tag, ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Home page like Hypebeast.com’ is closed to new replies.