Viewing 7 replies - 1 through 7 (of 7 total)
  • that’s not actually your site right? – ‘cos if it is, you’re in the wrong place.

    Thread Starter Shaooxz

    (@shasoosh)

    no no, it was just an example for the theme. my site is in hebrew, that’s why i didn’t linked to it

    well, I’m not familiar with the theme, but if you open the header.php and look for wp_list_pages, you may have to insert a link manually in that section. That’s the most likely…

    if the theme uses link categories (like the blogroll) to manage the navigation (which all themes should, in my opinion) then you might be able to add the link into the appropriate link category under manage/links in the WP admin panel.

    If you find it is the former, and you’re having trouble adding a link, paste the relevant section surrounding wp_list_pages, and I’ll knock up a link for you.

    Your choice of positioning the link will be limited if that’s the case, however.

    Thread Starter Shaooxz

    (@shasoosh)

    i see.
    well, thats what i’ve added:

    <?php wp_list_pages('title_li=&depth=1');?>
          <li><a href="link">text</a></li>

    and it works but the location has got nothing to do with its content.
    Any alternatives?
    Maybe i’ll “write” a new page and enter a reference to the category url in the page html? Or that’s just to twisted.. :\ ?

    well, you have a couple of choices in that regard.

    you can either use wp_list_bookmarks(); in that location instead of wp_list_pages… and then make your menu yourself, via the manage/links option in the wp Admin panel….

    or…

    you can create a new page template, (call it redirect.php or something) that looks like this:

    <?php
    /*
    Template Name: Redirect
    */
    
    if (have_posts()) {
       the_post();
       $pattern = '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@';
       preg_match($pattern, get_the_excerpt(), $matches);
       if ($matches[0]) header('Location: '.$matches[0]);
       else echo 'Enter a URL into your page body text.';
    }
    ?>

    Then set that as the page template for any page you wish to use as a redirector.

    The contents of that page should just be a link to where you want to go.

    It is a little twisted, but I really like twisted ??

    NOTE: Make sure there’s no white-space before the <?php

    for the record, your easy question turned into a bit of a sewer monster ??

    Thread Starter Shaooxz

    (@shasoosh)

    Twisted it is! ??
    worked, thanks man!
    take a look at this thread if you feel like
    thanks again..

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘easy easy question !’ is closed to new replies.