niki
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: exporting posts from specific categorythanks!
I’ll try again with the upgrade…
Forum: Fixing WordPress
In reply to: exporting posts from specific categoryha! 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 …
Forum: Plugins
In reply to: Automatically Process Postie – How To?You could try something like this:
https://www.webcron.orgset 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) ??
Forum: Fixing WordPress
In reply to: current_page_item class not being generatedI never found a solution (or even really what the problem is) you can see the effects within this section of the website
When you view a page the square bullet should be filled in, but this only happens on some of the pages.
Forum: Fixing WordPress
In reply to: customised loop and categories with 2.0After 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 strippedyou 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.
Forum: Plugins
In reply to: IImage Browser stopped working..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.
Forum: Themes and Templates
In reply to: different css for different templatesHi 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 ??
Forum: Themes and Templates
In reply to: different css for different templatesYeah! 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?Forum: Themes and Templates
In reply to: different css for different templatesThanks 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 ??
Forum: Themes and Templates
In reply to: different css for different templatesHi 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
Forum: Themes and Templates
In reply to: template dependent navigation for static pagesLOL! 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.php2.
Create a different sidebar file for each of my sections. eg about_sidebar.php3.
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!
Forum: Requests and Feedback
In reply to: How do I search post metadata?Someone posted this on another thread:
https://randomfrequency.net/wordpress/search-meta/
seems to do the job!
Forum: Fixing WordPress
In reply to: Archive Pages Not FoundI 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.
Forum: Fixing WordPress
In reply to: Email Notification Plugin and ExcerptHave 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