• I’ve exhausted myself going through all the plugins to find one that will work with 2.7.

    What I’d like is a plugin The would allow you to turn each page into a separate blog. Basically, I’m doing a site for a record label and they want to have writers access and post Reviews, News, and Interviews. I’d like to be able to give each section a paragraph or so and then list the articles and small snippets by date.

    Ideally, this would be a pretty simple plugin, but if anyone knows anyway to do this, I’d be forever grateful! Thanks…

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi

    It only takes a few lines of code – don’t really need a plugin

    First look at this
    https://codex.www.ads-software.com/Template_Tags/query_posts

    Then, on your pages.php, put code like this before the loop starts

    <?php if (is_page('reviews')) {
       query_posts('cat=13'); ?>
       <p>Blurb for Reviews Category goes here</p>
    <?php } elseif (is_page('interviews')) {
       query_posts('cat=6'); ?>
       <p>Blurb for Interviews Category goes here</p>
    <?php } elseif ((is_page('news)) {
       query_posts('cat=4');?>
       <p>Blurb for News Category goes here</p>
    <?php } ?>

    ==== LOOP starts here ==============

    You have to create the blank pages of course. This will turn each page into a posts page that only displays posts from the category(s) you specify. Have to use the real category ID’s, not my sample #’s.

    Thread Starter skipzero

    (@skipzero)

    Thanks so much! Very helpful!

    Thread Starter skipzero

    (@skipzero)

    Great, a few typos in the above code, but after those were corrected, works fine! Thanks so much. Now, can you point me to where I can find a way to limit the amount of each post on that page? A character limit added to the above, with the more link would be perfect! If you point me to another place that would explain how to add that line, Im sure I could figure it out!

    Thanks again!!

    Thread Starter skipzero

    (@skipzero)

    the_excerpt tag seems to give me a decent amount of text, but theres no link to read the rest of the article. I’d like the content to show like it was a home page. Is that possible with the addition of a couple more lines of code?

    hi

    investigate the Read More tag on the editor toolbar – when you insert a More tag it inserts a post break at the point where you want it, not at the arbitrary 55 words that the_excerpt uses.

    If you do want to use the_excerpt, here is some code to modify the ellipse and to add a read more link. Put it in your theme’s functions.php if you use it and it installs itself.

    function excerpt_ellipse($text) {
       return str_replace('[...]', ' <a href="'.get_permalink().'">Read more...</a>', $text); }
    add_filter('the_excerpt', 'excerpt_ellipse');
    Thread Starter skipzero

    (@skipzero)

    Brilliant!! Yeah, I saw the info on the more tag, I just want options as this is for a client and who knows whose gonna end up being the end user…

    Very Much appreciated!!

    Hi guys, Thanks for this awesome explanation. I am trying to do this and am only getting one post on the page. Can someone check it out and see what I am doing wrong?

    https://www.digitalplantdesign.com/jobs (autoplant jobs link) thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add categories to static page?’ is closed to new replies.