ifelse
Forum Replies Created
-
Forum: Themes and Templates
In reply to: 1 post on front page onlyThanks for the feedback, Kafkaesqui.
“If a theme is using index.php for more than just the “home” page, they might have issues with your code.”
Hopefully, the first step that I added in the post (making a copy of index.php and renaming it to home.php) should make that a non-issue as home.php should only be used for the front page.However, if anyone doesn’t want to retain a home.php page as well, then Kafkaesqui use of the is_home conditional will work perfectly well in the index.php.
BTW, if there’s something else which I’ve overlooked however, feel free to point it out:-)
Forum: Themes and Templates
In reply to: 1 post on front page onlyI’ve written a post on how you can do this without resorting to plugins. This is also preferable to changing the reading options as it doesn’t affect how many posts are shown on other pages besides the front page i.e. pagination isn’t broken for archives and search pages.
Forum: Themes and Templates
In reply to: Sidebar: Pages: Home link on underlying pages only?“Is there any way of getting the home-link to appear only on the underlying pages?”
Try this:
<?php if(!is_home){?>
<li><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php }?>Forum: Fixing WordPress
In reply to: FireFox Looks like… IE Looks likeCan you do a force refresh (CTRL + F5) to make sure you’re not caching the css file? It appears fine on my machine.
Forum: Fixing WordPress
In reply to: FireFox Looks like… IE Looks likeI suspect that it’s due to the following line in your post:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\systemTry adding the following line to your style.css:
.entrybody p {
margin-top:8px;
margin-bottom:16px;
overflow:hidden;
}Forum: Requests and Feedback
In reply to: templates php-free and users levels non-crypticOh … well I like PHP better.
Me too:-)Forum: Requests and Feedback
In reply to: templates php-free and users levels non-crypticThere is no way to make a dynamic site (blog or CMS) without PHP code. PHP is a dynamic language which uses queries, commands, etc. to display information.
That’s far from true. There are many blog/CMS which are based on a true templating system in which the underlying driving code and template design code are fully segregated. I, myself, designed such a system back in the days before WP.Whilst both approaches have their pros and cons (and the fact that I’m using WP myself means that I’m not adverse to WP approach), to state that such is the only solution is a bit of a misnomer.
That said, let’s go back to the OP’s queries.
a) It would be extremely unlikely that there will be any change in this area. You’ll have to assess whether this is something that you can live with. With regards to security, appropriate assignation of user_levels should mitigate any such risk.
b) They’re slightly cryptic but it’s well documented Have a look at the codex and if you have any queries, we’ll try and help out.Forum: Fixing WordPress
In reply to: Moderating Posters?Set their user level to 1. That’ll allow them to write drafts but they’ll be unable to publish. An admin can then go in and publish the one’s that they see fit.
Forum: Fixing WordPress
In reply to: multiple adminsUser levels 8, 9 and 10 have exactly the same level of capabilities (see Codex). Hence, the ideal approach would be what Sushubh suggested and leave admin for emergencies and instead set up multiple accounts with level 8 (including yourself).
Forum: Plugins
In reply to: Basic PHP QuestionKafkaesqui got there first… should have clicked refresh before posting:-)
Forum: Plugins
In reply to: Basic PHP Questionthe_permalink echoes the permalink url. I think what you’ll need is get_permalink()
Forum: Plugins
In reply to: Basic PHP Questionsplit is really the wrong function to use in this instance. Split breaks up a string into array. What you are asking for is the substring of everything after your delimiter ‘=’.
First you’ll need to find the position of the delimiter.
$pos = strpos($testLink,'=');
Now, using this offset, we can get everything after it.
$number = substr($testLink, $pos);However, whilst this is what you asked for, this may not be what you are looking for. This may, on ocaasions, get you a load of unrelated info e.g. if the reader does a search.
You can get what you want with the following:
$number= $_GET['p'];This will allow you to get the value of the get variable p that is passed in the query string.
Forum: Plugins
In reply to: retrieving the search termsThat works brilliantly. Thanks Yami!
Forum: Fixing WordPress
In reply to: Using the word ” “FYI, I’ve tried submitting a post entitled compress and that went through fine.
Forum: Everything else WordPress
In reply to: Getting the word out…Rereading what I wrote, it sounds a bit harsh. Just to make clarify things, that was general advice and not directed at you specifically.