Forum Replies Created

Viewing 15 replies - 16 through 30 (of 161 total)
  • There’s a plugin or two with login box widgets (see the Mini-Meta Widget plugin). Borrowing the code from one of them and modifying that would probably be the simplest trick.

    If you want to do this from scratch, then the actual code shouldn’t be that difficult. It’s mostly setting up a simple if-else statement:

    <?php if (!is_user_logged_in()) {
    // "Hello there, Guest..." plus the form
    } else {
    // Welcome back, username. Logout.
    } ?>

    …And copying the login form from the wp-login.php file (which is in the root of a WP install). The code you’ll need is around line 430.

    You’ll have to remove some of the <p> tags, tweak the size of the form controls, and maybe change the classnames of the form controls so you can better style it.

    For the login form to work on every page, I think you’ll need to modify the action attribute from action="wp-login.php" to action="\wp-login.php" (assuming WP is installed in the root of your domain’s directory). — The slash (“\”) at the beginning of a URL is shorthand for the root directory.

    There’s also wp_loginout() which provides a simple (text) login or logout link.

    Since WordPress 2.0, WP has included a visual editor (TinyMCE). Users of WP don’t need to know HTML.

    If I write a new post with the following content, it will break the page where the content will appear.

    </div></div></div></div></div>

    Or anything that’s a closing tag.

    Not in the visual editor of the current version of WordPress (2.5.1):

    In WP 2.5, the visual editor automatically converts greater-than, less-than, and other symbols to their respect entity values (&gt;, <, etc.)*

    In WP 2.5, if one switches back and forth from the code editor to the visual editor, nesting errors are automatically corrected.*

    If a (1) user enters something in the “code view;” (2) the user does not switch back to the visual editor before saving the post; and (3) the “correct invalidly nested XHTML” option (see below) is not checked, then the above is possible.*

    And, yes, if a user enters code in the visual editor of the 2.0 legacy branch, that is not automatically corrected or converted to entities.*

    Is there a way to filter or validate the code before it gets publish.

    Don’t use the code view. Or, if you are using the code view, then in the Settings > Writing page, mark the checkbox labeled ” WordPress should correct invalidly nested XHTML automatically”. This is unchecked by default, as most users only use the visual editor and (as I understand it,) for plugin compatibility issues. See the Codex page for the Writing options subpanel). And, if one is obsessive about validation, they can always manually run their pages through the W3 validator.

    *I checked all of this on new, clean installs of WP 2.0.11 and WP 2.5.1.

    The theme might be using what’s technically called “Descendant selectors” (see the CSS 2.0 spec page for Selectors).

    Which would be something like #sidebar ul li (that’s from default Kubrick theme).

    If there aren’t any sidebar list related CSS declarations, than you could use the general widget class ( .widget {list-style: none; } ) or the specific ID’s of the widgets (look at the generated HTML for your site), which would be #meta {list-style: none; }.

    For CSS/stylesheet debugging, the following browser extensions are “must-haves” —
    Web Developer Toolbar and Firebug extensions for Firefox
    IE Dev Toolbar for Internet Explorer

    To gain access to the WordPress engine on a non-WP page, make that a PHP file and include the following line (though you may want to add some error handling):

    require('path-to-wp-install-here/wp-blog-header.php');

    Then you can use a query_posts() call with a Loop.

    The main drawback to the above solution is that you’ll be invoking the entire WP engine, though that would still happen with an RSS solution (unless you’re using Feedburner or a similar service.

    The best solution (if you know PHP and SQL) would be to write a simple script that pulls the info you want straight from your WP database.

    Please take a look at How to Pass Tag Parameters – Query-String Style Parameters

    Inside the parentheses for a function, the format is ‘parameter_name=value’ – single quotes around everything, no spaces. Multiple parameters can be joined by using the ampersand(&).

    Thus…

    <?php wp_list_bookmarks( 'category_name=some-name' ); ?>

    <?php wp_list_bookmarks( 'category=7' ); ?>

    If by “the 3rd option,” you mean the “Attempt to notify any blogs linked to from the article (slows down posting.)” checkbox, then that only affects blog-to-blog pinging (e.g., trackbacks).

    In your theme’s files, find this bunch of code:

    .topgrad img {
    left:0px;
    position:absolute;
    top:0px;
    z-index:0;
    }

    The “position:absolute;” is the culprit here. As far as my cursory glance can tell, that entire CSS declaration is unnecessary, so just remove it.

    Fixing the validation errors is equivalent to debugging a program. You have to go line by line and look for problems. The fact that WP uses dynamic template system with multiple files and pulls content from a database complicates the matter.

    When validating a theme, I find it easiest to to start with a simple page, such as a post page where the post’s body contains only text, and you have all plugins disabled. Then, check that page and see what errors, if any, are present. You fix those errors and then move on by enabling plugins and trying other pages.

    Web page validation is all about finding coding errors, which for XHTML is mainly unclosed elements (such as <div> or <p>). You just have to check your theme’s code and diligently search for problems.

    Though, even if the theme is valid, plugins that you use may not be coded to the highest of standards. These could introduce code errors, which could screw up the rest of your site. And, there’s also a possibility that the visual editor may produce broken code in some circumstances. I mention all that because even if you design a valid theme, there are still ways for the pages that WP generate to be invalid.

    The Web Developer Toolbar extension and the Firebug extension for Firefox are useful tools for debugging web pages. There’s also an official IE Dev Toolbar for Internet Explorer.

    If you have a good text editor (with features such as syntax highlighting, bracket matching, etc.) that greatly helps editing WP files.

    Forum: Plugins
    In reply to: Table of contents plugin

    Take a look at these plugins: Clean Archives Reloaded or Dagon Design Sitemap Generator.

    You might be able to use wp_list_pages() as the basis for a “CSS dropdown menu” (just search Google for that phrase), but, personally I think a flat and simple navigation menu is easier to use for most people.

    Let me ask the question differently: why is it that, from my main page, all of the sub-pages can successfully be selected from the horizontal nav bar in the header, *except for* the “What’s New” page? What did I do to this page to make it special?

    Not sure…
    -Is the page “published” and not a “draft?”
    -Are you using a page template for the particular page? If there’s some sort of special query being used, that might mess up other things.

    If you are using a page template, you could paste the contents of the template, here, if it’s not too long. Or, better yet, there’s wordpress.pastebin.ca.

    Also, pasting the code you’re using for the wp_list_pages will help as well.

    You do seem to be using a somewhat non-standard structure for your site, which adds to the degree of difficulty for finding a solution to your problem.

    Please see this post for a possible explanation of the issue.

    I’ve messed with both, the query_posts would work if I could figure out how to just get the title of the posts.

    Then, you just need to use a loop with <?php the_title(); ?> inside of it and not the_content, the_date, all those other functions.

    Can do query_posts(paged=5) and make the “5” a var so it can be dynamic. So I could have displayed which posts are on which page. Does that makes sense?

    Unless you’re doing something advanced with WP pages and Page Templates, WP will automatically get the correct posts based on the area of your website that a user is requesting. This includes “paged” queries.

    This is easier to see in action if you have pretty permalinks enabled. E.g., the second page of posts for a site’s front page would have the structure “/paged/2/”. If someone is browsing a category archive, the structure is “/category/cat-name/”. There’s nothing special that needs to be done as long as the proper template has a loop.

    Adding a query_posts can mess up the default query, so if you don’t need to use that function, then leave it out.

    Yes. Here’s a few options:
    (1) Use a custom Loop with a custom query_posts call before it.
    (2) Use wp_get_archives with the “type=postbypost” argument.

    There is also a “Recent Posts” widget that can display a number of your most recent post titles in your sidebar, or elsewhere, depending on your theme’s configuration.

    Take a look at the wp-sticky plugin. There are other options, such as modifying the default query for the home page (but that would take editing your theme’s files).

Viewing 15 replies - 16 through 30 (of 161 total)