Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter niki

    (@niki)

    thanks!

    I’ll try again with the upgrade…

    Thread Starter niki

    (@niki)

    ha! thought the search was being a bit weird. Thanks for pointing me in the right direction!

    The new install has the manage>export option the technosailor.com plugin refers to, but the old one (the one I’m exporting from doesn’t)

    I’ve tried upgrading, but that doesn’t seem to have worked. (Will try again later). Do you happen to when (ie what version of WP) the manage>export option was introduced. The version I was running was 2.0 …

    You could try something like this:
    https://www.webcron.org

    set up a task to load
    your_installation_path/wp-content/plugins/postie/get_mail.php
    and set the frequency

    (you can’t do it more often than hourly, but it’s free and easy) ??

    Thread Starter niki

    (@niki)

    I never found a solution (or even really what the problem is) you can see the effects within this section of the website

    https://www.tfsr.org/africa

    When you view a page the square bullet should be filled in, but this only happens on some of the pages.

    Thread Starter niki

    (@niki)

    After reading this article:
    https://ifelse.co.uk/archives/2005/04/08/query_posts-redux/
    I changed the format to

    <?php query_posts('cat=1&showposts=7'); ?>

    and that seems to do the job.

    Forum: Fixing WordPress
    In reply to: quicktags stripped
    Thread Starter niki

    (@niki)

    you beat me to it Beel!

    just came back to say it was a cut and paste error – the loop was using the_excerpt rather than the_content.

    I’ve been having the same problem: clash between wp-contactform and iimage-browser preventing the latter from working.

    Deactivating wp-contactform in the plugins screen “solved” the problem after a fashion, but a better solution for me was to replace iimage-browser v1.4.3 and 1.4.5 with the earlier version of v1.4.2. I can now run both contact form and iimage browser simultaneously.

    Thread Starter niki

    (@niki)

    Hi moshu, thanks for your persistance!

    No apology required: I agree entirely with your logic and it’s the same train of thought I have been following. So if it’s wrong then we’re both wrong together ??

    It’s just the template recognition bit that seems to be the stumbling block: I’ve not been able to get the $template = $_GET['template']; thigummy to work for me so I can then tweak it to bring in the stylesheet stuff.

    Sorry if it seemed a bit random, my last post is just me fiddling with that stuff to try and get proof that the first bit works. No joy yet!

    Maybe it’s completely the wrong approach, but it feels like it should work and my gut feeling is this sort of template conditional stuff would be a very useful tool in future work so if there is a solution I’d like to chase it for a bit longer ??

    Thread Starter niki

    (@niki)

    Yeah! Those posts are where all this started!

    cut, paste, tweak, try again until eventually it mutated into the thing in my first post…

    This is the code of interest in the first post moshu indicated:

    $template = $_GET['template'];
    if ($template == "user") {
    include(TEMPLATEPATH . '/user-sidebar.php');
    } elseif ($template == "dev") {
    include(TEMPLATEPATH . '/dev-sidebar.php');
    } elseif ($template == "mgmt") {
    include(TEMPLATEPATH . '/mgmt-sidebar.php');
    } else {
    get_sidebar();
    }

    But it’s the template recognition thing that seems to be tripping the whole thing up.

    As a test, I have edited it slightly to give this:

    <?php ;
    $template = $_GET['template']; //as per original
    if ($template == "about_section") { //one of my template files
    echo "about_section";
    } elseif ($template == "africa_section.php") { //incase I have the format wrong!
    echo "africa_section";
    } elseif ($template == "tfsr") { // the name of my theme directory to test something I thought I saw happening previously
    echo "tfsr";
    } else {
    echo "nothing doing";
    }

    ; ?>

    I put this code in my footer.php file. Every page in my site now has “nothing doing” in the footer regardless of which template I have assigned it to!

    How do I get it to print on screen what template it thinks I am using so I can check what’s going on?

    I have tried things like

    <?php $template = $_GET['template'];
    echo $template;
    ; ?>

    and variations but I’m not getting anything. What syntax should I use?

    Thread Starter niki

    (@niki)

    Thanks but…

    I need it to take into account not just the About page, but its children and its grandchildren *and* also allow for any extra pages my clients may decide to add at a later date!

    The rejigging the files option is starting to look more attractive ??

    Thread Starter niki

    (@niki)

    Hi and thank you all for your responses.

    If all else fails I’ll re-jig my files so the header ends sooner and the css links are in the section-specific template files.

    In the meantime though I’m curious to see if there’s a way of doing this with conditional statements…

    If I were to use conditional statements along the lines of “if this page is allocated to the about-section template, then call this file”, how would I write that?

    I’m ok with using code like this:

    <?php
    $post = $wp_query->post;
    if ( in_category('9') ) {
    include(TEMPLATEPATH . '/single9.php');
    elseif ( in_category('12') ) {
    include(TEMPLATEPATH . '/single12.php');
    elseif ( in_category('42') ) {
    include(TEMPLATEPATH . '/single42.php');
    } else {
    include(TEMPLATEPATH . '/single1.php');
    }
    ?>

    with posts in categories, but just to reiterate that I am working with pages.

    Cheers and thanks again for your help

    Thread Starter niki

    (@niki)

    LOL! I was looking at that one earlier but before the latest entries were added!

    What I eventually got working for me was:

    1.
    Create a different template for each of my sections. eg about_section.php

    2.
    Create a different sidebar file for each of my sections. eg about_sidebar.php

    3.
    In each template, call the relevant sidebar file eg


    <?php include(TEMPLATEPATH . '/about_sidebar.php');?>

    4.
    in each sidebar file use wp_list_pages() to display the children of, for example, the about page

      <?php wp_list_pages('child_of=2&title_li=&sort_column=ID&depth=1' ); ?>

    Change the arguments to suit…

    Lots of files and it doesn’t seem particularly elegant but it seems to be doing the job!

    Someone posted this on another thread:

    https://randomfrequency.net/wordpress/search-meta/

    seems to do the job!

    I have a variation on this:

    Using 1.5 (set to display 10 posts per page with 17 posts made) I get 10 posts on my homepage, a “previous entries” link that takes me to a page with 7 posts and another “previous entries” link that then takes me to the 404 error.

    I have tried deleting entries in .htaccess as above and have also tried it whilst switched to the Kubrick theme.

    Thread Starter niki

    (@niki)

    Have tried some blundering and haven’t managed to find the solution yet…

    Do I need to instruct the .php file to get the excerpt data from my database before it will recognise it as a variable?

    As I said earlier, my knowledge of PHP is minimal, any pointers would be most welcome!

    Thanks

Viewing 15 replies - 1 through 15 (of 17 total)