scribblerguy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Author resource boxUnless you’re doing something extra complex, just have each author put their miniature biography in the “About Yourself” box. That way, the information can be edited inside WP, instead of manually editing a PHP file.
Please take a look at the Author Template Tags and see if using a combination of those can do what you want.
Instead of separate files, can all this be done with conditional statements in the single.php template file?
if (get_the_author_nickname() == "saralex") { // do something } elseif (get_the_author_nickname() == "Another Name") { // do something else } else { // when all else fails, do the default }Consider taking a look at this tutorial: PHP Easy PHP Tutorial for WordPress Users
Other notes:
-WordPress template tags that begin with “the_” generally output (print) the information. Template tags that begin with “get_” usually return the information for use inside a function.-In PHP coding, a semi-colon (“;“) is used to denote the end of a line of code. Using it inside a function such as
include()will cause errors.Now, if you were to include a file like you originally wanted, your best bet would be to use something like the following:
<?php include( get_bloginfo('wpurl') . '/wp-content/my-includes/' . get_the_author_ID() . '.php' ); ?>where get_the_author_ID returns the user ID (a number) for the author.Forum: Fixing WordPress
In reply to: InCorrect Appearance in Explorer, Correct in MozillaWelcome to the wonderful world of browser rendering differences.
It looks like your pages have some invalid XHTML markup. For example, from the end of one of your pages:
</body> </html> </div> <!--End Main Content Container -->A div element should be closed before the end tag of the body element
</body>. There seem to be other issues of unclosed HTML elements as well, which could screw up the way a browser processes CSS stylesheet rules.To fix the errors, you’ll need to examine and validate your theme’s files. I’d create a very simple new post or page (no images, just a short plain text message. Then validate that page and edit your theme as necessary to correct the problems.
The WWW Consortium hosts a validation service: http://validator.w3.org/
Useful links for HTML and CSS are in the Codex: Know Your Sources
Try the plugin Custom Query String Reloaded (download link).
Forum: Themes and Templates
In reply to: Displaying posts in category as navigationWhen you add the template tags for your the main content, that needs to be inside a “Loop” as well, because, to get the template tags to work,
the_post()function is necessary.From your code, starting at line 55:
<?php $wp_query = $my_query; ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?>The last two lines need to be inside a Loop.
Based on your current file, replace the above code with the following, and that should get everything working.
<?php $wp_query = $my_query; ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; else: ?> <?php _e('Sorry, no posts matched your criteria.'); ?> <?php endif; ?>Forum: Themes and Templates
In reply to: Displaying posts in category as navigationOh, sorry, I had a fragment in my original post.
Anyway, take a look at the Codex page for The Loop, especially second example for a multiple loop. That example (#2) has the code you need.
Forum: Themes and Templates
In reply to: Displaying posts in category as navigationI’m guessing you’ve found your way into the Codexquery_posts, which is good. Without see your more of your source code, I can only take a guess at what’s wrong.
As you may know, the query_posts function, when before a loop, overrides the default query that WP runs for a particular page (e.g. the most recent posts for a front page). If a query_posts() call is put before one loop, and then another loop is used, that second loop will use the same query as the first query_posts() call.
I think that’s what happening in your case. The Loop, especially the multiple loop example #2. You’ll probably want to do something like that – save the temp query and then call it before your second loop.
If I misunderstood or you’re still having problems, then you’ll need to post the full code of your index.php and the sidebar.php (or whereever this navigation is going) so we can understand what’s all going on. Paste those into the WP pastebin at this address: http://wordpress.pastebin.ca/. Then, link to the files.
Also, I’m getting database connection errors when I try to visit your site.
Forum: Everything else WordPress
In reply to: TAKING A POST AND MAKING IT A PAGEJust edit your post. Copy the contents. Paste that to a text document. Create a new page. Paste in the contents. Once you publish the page, delete the post.
Forum: Everything else WordPress
In reply to: RSS FEEDForum: Everything else WordPress
In reply to: RSS FEEDIt’s done automatically. There’s nothing you need to do.
Since you are new, I’d recommend taking a look at the wealth of useful information in our Codex.
Forum: Themes and Templates
In reply to: Page Template Help – Single Page ContentIf you have a file in your theme’s folder named page.php, then it will be used throughout your site automatically for all “static” pages. Only use a page template if you want some pages to styled differently / have different sidebar(s) / exclude content / etc.
I just need it to be limited to the page the template is currently being applied to. Make sense? Help?
This is done automatically when someone navigates to the address of a particular page: WP only retrieves the content for the particular page and displays that inside “The Loop.”
For your site http://www.inourownwordsmcc.org, if you navigate to the About page (at http://www.inourownwordsmcc.org/?page_id=2), WP will only grab the content and meta data for the page with an ID equal to “2” and nothing else. There’s nothing you have to do. This is automatic.
Please take a look at Template Hierarchy and Pages for more info.
Forum: Fixing WordPress
In reply to: Can’t log in?just in case: Resetting Your Password
Forum: Fixing WordPress
In reply to: Core dumps appearing in WP folderHere’s what I’d do: Try a clean install of WordPress (delete all old files, re-upload, new, empty database). Make sure you backup your blog (export all posts and also back up the database).
If the dumps still occurs, then contact your webhost’s support, because this looks like a server issue.
Forum: Fixing WordPress
In reply to: Custom link from PagesAs to creating “basically a second web page,” take a look at the Pages page in the Codex.
For “send via ftp” — do you just mean provide a page with a bunch of links to files that can be downloaded? If so, that sort of file transfer is handled by the normal HTTP protocol. FTP is a separate protocol and usually requires an ftp server with anonymous access, plus all links must begin with “ftp://”.
Forum: Fixing WordPress
In reply to: Comments Section not showingErrata for earlier comment: The “Anyone can register” option would be for allowing any random person to get a user-name and password so they don’t have to enter their name, email, website each time they comment on your blog. If you don’t want to have to deal with having registered readers, then you can uncheck that.
fybro, my suggestion should fix your problem. I see that you’re using the default theme and I checked the settings on my test site. Don’t let poppabear’s post confuse you.
poppabear: By doing what scribblerguy suggests, anyone can add comments. How do you fix Fybro’s problem without unchecking the registered users block?
It’s not nice to hijack someone else’s support thread.
Forum: Fixing WordPress
In reply to: Allow unregistered users to postThat thread is about comments, not posts.
Is it possible to allow users to add Posts without requiring them to register at all? …just go to the main page and Post a new article…
this is a protected internal company blog, so limited risk…
Not really. Take a look at the TDO Mini Forms plug-in.
Addendum:
1. If this is a intranet blog, then you could create an “anonymous” author user account. Then, in the sidebar, just have a text widget with the username and password along with a link to the login page. I’d suggest changing that password and perhaps the user-name on a regular basis.2. You could also set the default user level to Author. See Roles and Capabilitiesin the Codex. Then, when someone registers, they automatically have the required permissions to create a post and publish.