Joshua Sigar
Forum Replies Created
-
Forum: Installing WordPress
In reply to: Simple Theme AdditionsIt’s the same procedure for every theme as laid out below.
Forum: Installing WordPress
In reply to: Stop people from accessing categoriesSay, you don’t want people to go to Category page, create a file
category.phpin your theme folder and insert the following.<?php
$wp_redirect(get_settings('siteurl'));
exit;
?>Just insert the above content to the appropriate template file (e.g. single.php, date.php, http://codex.wordpress.org/Template_Hierarchy ).
Forum: Installing WordPress
In reply to: how can i…You can specify the following markups.
<h1 class="post-title">Something</h1>and somewhere else
<h1 class="category-title">Title</h1>And in your CSS file
h1.post-title {
color: blue;
}h1.category-title {
color: red;
}
Forum: Fixing WordPress
In reply to: Password protected categoryIt certainly is possible, though it entails a lot work.
A plugin will have to maintain table as follows.
cat_id | password
----------------------
1 | lkjakne
2 | opi23kn
The plugin has to provide an interface in admin panel to allow admin to maintain the table above.
The plugin then registers the following set of procedures to
template_redirecthook
1. Check if current page is Category page or Singe Post page.
2. If condition 1 is true, check the table if password is assigned for current Post’s category (Single Post page) or active category (Category page).
3. If condition 2 is true, check cookies if password is not previously entered.
4. If condition 3 is true, redirect the page to password form.
5. Once valid password is entered, record that to cookies and redirect to previous page (Single Post or Category page).Forum: Fixing WordPress
In reply to: The Loop and subpagesIt returns as many titles as there are childs.
Well, it is supposed to.You may need to rephrase either your observation or your request.
Forum: Themes and Templates
In reply to: More conditional tags?If they prove to be used a lot, template tags will be added by developers. None of you suggested above is really popular at all.
But you can always whip up your own function. Just find the function edit_post_link() in the source code and rip it off.
The following is a portion of edit_post_link() which you can use/tailor for your purpose.
<?php
get_currentuserinfo();if (user_can_edit_post($user_ID, $post->ID)) {
// current user can edit this post
}
?>Forum: Fixing WordPress
In reply to: The Loop and subpagesNope, that’s not gonna work. Dunno, something like this.
<?php
$my_pages = &get_pages('child_of=7');
foreach ($my_pages as $page)
{
setup_postdata($page);
the_title();
the_excerpt();
}
?>Forum: Fixing WordPress
In reply to: Posts for different category showing in main categoryBy design, all Posts regardless of their category will show up in the front page.
If you want to display Posts of only certain category, you could use the following plugin. (Instruction is in the file.)
http://dev.wp-plugins.org/file/front-page-cats/trunk/front_page_cats.php?rev=57&format=raw
Forum: Fixing WordPress
In reply to: Calling all posts from one categoryInsert the category name as it is
WP_Query('category_name=Site news&showposts=10')Forum: Fixing WordPress
In reply to: My host says my site got hacked?nevermind
Forum: Themes and Templates
In reply to: Theme with Columns on bottomYou mean a theme with a header, and two columns (sidebar and content) below the header?
Forum: Fixing WordPress
In reply to: Remember Me doesn’t remember meDoes the problem occur in different browsers?
Make sure your cookies is enabled for your browser, delete all of the cookies previously stored (or just the ones come from your site) and try again.
Forum: Fixing WordPress
In reply to: Order from the First to the Lastest PostIt goes to the file
index.phpin the root directory (NOT theme directory) of WP installation
<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
$order = 'ASC';
require('./wp-blog-header.php');
?>
Forum: Plugins
In reply to: Need to filter or hook just after body tag…I would really like to move it up the page, as the javascript needs to be there to use the DOM efficiently.
I’m really curious why “the javascript needs to be there.”
Forum: Plugins
In reply to: Post and/or Page Specific Stylesheet (CSS) LinkYou can try this off-the-top-of-my-head plugin
<?php
/*
Plugin Name: Specific Stylesheet
Version: 1.0
Plugin URI: http://mysite.com
Description: Do something--I guess.
Author: Me
*/function ss_insert_stylesheet() {
if (is_single()) { // needs to customize the condition
echo '<link rel="stylesheet" ... />';
}
}add_action('wp_head', 'ss_insert_stylesheet');?>