Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    I am owning the recent threads in this section haha sorry for all the questions this is the only good wordpress help forum i know!

    1. A question about displaying subpages in my sidebar. I currently have this in place in a php file of a theme im using here: www.ziggiville.co.uk, to display the pages:

    PHP Code:
    <div class="pages">
        <ul>
          <li class="<? echo (is_home())?'current_page_item':''?>"><a href="<?php echo get_option('home'); ?>/">Home</a></li>
          <?php $pages wp_list_pages('sort_column=menu_order&depth=1&title_li=&echo=0');
    echo 
    $pages?>
        </ul>
        <? unset($pages); ?>
      </div>
    I want to also display subpages so I can sort the pages into a silo type structure and help SEO. I read something that told me to place this into your theme where you want the pages/subpages to appear. But i do not know how to add this following code to what i already have above, or how to change it/if its right - i can't read php very well
    PHP Code:
    <?php
    $children 
    wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if (
    $children) { ?>
        <ul>
            <?php echo $children?>
        </ul>
    <?php ?>

    2. Also, I wondered if anyone knew how to remove a link from the pages links on a wordpress blog. I want to remove the link to "Home" that's automatically put there by wordpress.

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Ok, that second snippet generates a list of child items of the current post being displayed. It's probably intended to be displayed underneath the post itself. Can you post the full template?

  4. #3
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    ahh its okay steven i literally just fixed this.. was just a random guess but changed "&depth=1" to "&depth=2" in my original php code and it seems to have worked to include subpages

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    ah yeah that should do it. :-D

  6. #5
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    Hi steve

    only posting here really cause your the person whos been helpful in all my wordpress questions and i know you know about SEO too Do you know how to apply nofollow to specific page links?

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    I know how to do it with HTML... just use <a rel="nofollow" href="..."></a>

    I don't think wordpress has a specific feature to simplify the creation of nofollow links in page content, though.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:34 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com