Harry
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: private blogyou can password protect individual posts, if you make a post ‘private’, it can only be viewed by editors or admins of the site.
you could take a look through the plugins directory for some which may offer the functionality you’re looking for.
Forum: Fixing WordPress
In reply to: private blogProbably the best way to do this would be outside of WordPress, by Password Protecting your folder. Is this what you are after?
Forum: Fixing WordPress
In reply to: Loading gif on every pageWow, no errors in the console? You have provided no working code. Can’t really help more than that. Sorry.
Is it something to do with the Loop, and the fact it can’t tell what page/post you’re viewing before it gets to the declaration of the header.
Could you declare something like before your header if statement so as to access the post info?:
global $post;Forum: Fixing WordPress
In reply to: RSS feed not workingIt seems to be working here. You may just need to link your RSS icon to this link.
Right,
I’ve used something similar to determine parent/child categories.
I use this custom function (in functions.php):
function post_is_in_descendant_category( $cats, $_post = null ) { foreach ( (array) $cats as $cat ) { // get_term_children() accepts integer ID only $descendants = get_term_children( (int) $cat, 'category'); if ( $descendants && in_category( $descendants, $_post ) ) return true; } return false; }So you could try the following using the above:
<?php if ( is_category('<NAME OF CATEGORY>') || post_is_in_descendant_category(get_cat_id('<NAME OF PARENT CATEGORY>'))) { get_header('header2'); } else { session_start(); get_header(); }?><NAME OF CATEGORY> and <NAME OF PARENT CATEGORY> are replaced with your category slugs respectively.
Hope that is a step closer to resolving it or helping you out.
Admittedly I’ve never used terms to determine the header a theme uses, so all of this is speculative.
http://codex.wordpress.org/Function_Reference/get_term
http://codex.wordpress.org/Function_Reference/get_term_byAre you able to get the term via the functions above in order to somehow get your if statement to evaluate to true?
Do you have any code before term_exists(71), or have you ever got this condition to evaluate to true?
And header-header2.php exists in the theme directory?
Is it merely a modified version of the original header file and does it contain the necessary hooks from the original, just so everything loads okay?
Forum: Fixing WordPress
In reply to: GOT THIS ERROR MESSAGE – WHAT DOES IT MEANhttp://codex.wordpress.org/Login_Trouble – try some of these suggestions.
Forum: Fixing WordPress
In reply to: WP messing up my Paypal button htmlOM,
Ideally you should not be putting html like this for functionality/buttons directly into posts/pages. You should add these to the theme files so the WYSIWYG doesn’t overwrite the HTML. HTML is often stripped out automatically.
Posts/Pages are generally used for content entry only.
Hope this provides some explanation.
Thanks,
HarForum: Fixing WordPress
In reply to: GOT THIS ERROR MESSAGE – WHAT DOES IT MEANI DON’T KNOW, DID YOU ENABLE A PLUGIN RECENTLY?
ALSO, TRY NOT TO USE CAPS, AS IT INFERS SHOUTING.
Forum: Fixing WordPress
In reply to: How to Link to another URL?What? You want to link, but not link to another site. Your statement would appear to contradict itself.
Also, your main site is not loading.
Forum: Fixing WordPress
In reply to: Loading gif on every pageAs I guessed, you missed step one of the tutorial, which is essential to trigger the gif loading.
Change:
<body <?php body_class(); ?>>To:
<body onLoad="init()" <?php body_class(); ?>>Good luck. Hope this fixes it. Without it, the Javascript will not execute when the page loads.
Forum: Fixing WordPress
In reply to: Loading gif on every pageHi,
If I can’t see what you’ve done, I can’t help you, could you copy your code onto pastebin and add the link here, so I can at least see what you did with the code.