Forums

Problem displaying Links (10 posts)

  1. Righton
    Member
    Posted 6 years ago #

    I have a modified WP install where I'm using php to call each individual category and/or page by it's number.

    Well I have a file called links.php that contains the following:

    <?php
    $_GET['page_id'] = "12";
    include "all.php";
    ?>

    it called page 12 which contains the following:

    < ?php get_links_list('name'); ?>

    Using a different theme than I have now, it would show my links list as if it were the only thing on the page. Using my new theme, it doesn't wish to work any longer... does anyone know why this would work in one theme but not another?

    the address is http://www.jamesmeister.com/main/links.php

    Thanks!

  2. moshu
    Member
    Posted 6 years ago #

    Is that code in your Page's content or in the Page template? (also there is a space between the first "<" and "?")

  3. Righton
    Member
    Posted 6 years ago #

    it's in the page content I didn't put it in the page template because I have other pages that use it

  4. moshu
    Member
    Posted 6 years ago #

    Normally PHP code included in "content" doesn't run; you need a plugin for that. Search for RunPHP or PHPexec.

    Edit. There is also a plugin for Links page:
    http://wordpress.org/support/topic/32956

  5. Righton
    Member
    Posted 6 years ago #

    I've used PHPexec and RunPHP and both do not work.

    yes, WP is trying to break the PHP by adding that space but the plugins are not helping fix that problem.

  6. moshu
    Member
    Posted 6 years ago #

    As a second thought: isn't your method of creating a Links Page a little bit over-complicated?
    WP recognizes as theme template the file links.php if you have it in your theme. So, creating a template which has only the call for the links list in it, and then cerating a Page using this template would result in a Links page.

  7. Righton
    Member
    Posted 6 years ago #

    What's confusing me the most, is that the original links page worked in one theme, but when I changed themes, it broke.

    I'm using a Links-Page plugin but it's doing something VERY bad with the LI's and it doesn't put category headers above the groups in the "all" mode.

    Is there an update for this plugin?

  8. moshu
    Member
    Posted 6 years ago #

    1. What's confusing me the most, is that the original links page worked in one theme, but when I changed themes, it broke.

    If a certain template exists only in ONE theme, switching themes will cause troubles :)

    2. Which plugin? The one I linked to above? I don't know... I am not using it.

  9. Righton
    Member
    Posted 6 years ago #

    Also, I've specified a
    tage for between the URL and Descrip, but it refuses to insert one, and ideas?

  10. Righton
    Member
    Posted 6 years ago #

    Status: FIXED! :)

    I took the index.php that called the page content and removed the call for posts and replaced it with this:

      <?php get_links_list(); ?>

    then I made a page with this as a template file and it's working now!

    Thanks guys!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags