• Hello,

    Two hopefully simple questions that are frustrating me!

    Firstly – I want to add a second blog page, i.e. one where I can post individual posts which can be commented upon. New pages I can add, but they are never “blog” pages.

    Secondly – When I embed a youtube vid on such a blog page, it never works (!) It doesn’t appear on any browser yet stretches the screen. IS there a way of simply adding them?

    Any ideas? I’m not a programmer!

    Many thanks,

    James

Viewing 3 replies - 1 through 3 (of 3 total)
  • easy one 1st
    2) try this plugin
    https://www.ads-software.com/extend/plugins/vipers-video-quicktags/

    1)
    create a category for the posts you want on their own page – assign those posts to that category

    to display one category of posts on a page – assume the page slug of the page is ‘second-blog’ (change to actual)
    edit /wp-content/themes/{themename}/page.php template in a text editor – not a word processor (make a copy of the page as it is before you change anything)

    find the start of the WordPress loop
    ( looks something like this- sometimes on one line)

    <?php if (have_posts()) : ?>
       <?php while (have_posts()) : the_post(); ?>

    add this code before those lines – change the category ID of 12 to the category ID you want displayed on this page.

    <?php
    if (is_page('second-blog')) {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=12&amp;paged=$paged");
    } ?>

    You also need to exclude that category from appearing on your regular posts page.

    Before the WordPress loop in theme file index.php add this line of code

    <?php if (is_front_page()) {
      query_posts("cat=-12");
    } ?>

    If there already is a query_posts statement on your index.php page, instead of adding those lines, add this &amp;cat=-12 within the parentheses instead of adding another query_posts line – example query_posts("showposts=5&amp;cat=-12");

    I am looking to do this as well. What do you mean by “page slug”? Do you mean the title of the additional page?

    Thread Starter jamespwright

    (@jamespwright)

    Thanks. I managed to get the video to work by unchecking the

    Personal Options

    Use the visual rich editor when writing

    box.

    Unfortunately, I can’t edit the php codes as the site was set up another person’s computer – the guy who set the site up, who isn’t interested in helping.

    Thanks though.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set up 2nd blog page & embed youtube vids?’ is closed to new replies.