Forum Replies Created

Viewing 15 replies - 526 through 540 (of 1,218 total)
  • Are you sure you’re not “nesting” the folders? It’s a common mistake.

    How To Upload a WordPress Theme by Whoo

    You’re on the right track but you have a slight syntax error on one line although I’m surprised it didn’t throw an error message. Your missing a “}” on line 3 of the code you posted.

    <?php elseif ( is_page('51') ) { ?>

    Should read…

    <?php } elseif ( is_page('51') ) { ?>

    Although I understand what you mean I’ll clarify anyway. You’re not moving your blog to wordpress.org. This site is simply the place where you can get the free software to download and install on your server.

    You can get that theme from the author’s website –> chrismeller.com

    What makes you think you can’t use it on your own self-hosted blog?

    <?php the_author(); ?> is the template tag that displays the info contained in the field at Dashboard>Users>Your Profile. Look under Name for Display name publicly as

    You can either change the Nickname just above that field then select it from the drop down menu at Display name publicly as or, after changing the Nickname you can use <?php the_author_nickname(); ?> instead of <?php the_author(); ?> in your theme files.

    Hi jackstands,

    I just answered your question in the other forum where you asked it but I’ll answer it here as well for the benefit of others who may be wondering how to do it.

    You can approach this in 2 different ways using the query_posts() function. This is a powerful function and can be used for all sorts of things. You can:

    1. Include posts from ONE category to display on your home page or…

    2. Exclude posts from ALL categories except for the one you want to display on your home page. Either way achieves the same result. How you go about it I suppose depends on how many categories you actually have.

    Using method #1.
    Let’s assume you have 3 categories named Local, Viral and Product Reviews. At the very top of index.php insert the following…

    <?php
    if (is_home()) {
    query_posts("cat=x");
    }
    ?>

    …where x is the numerical ID of the category whose posts you want displayed. So, if you want to display posts only from the Local category on the home page then find the numerical ID of that category and insert it in the place of x.

    Using method #2.
    Again assuming you have the three categories as listed above insert the code below at the very top of index.php …

    <?php
    if (is_home()) {
    query_posts("cat=-x,-x");
    }
    ?>

    This will EXCLUDE all posts from the categories you specify.

    Further reading on query_posts() and the various arguments that can be passed to it at,

    http://codex.wordpress.org/Template_Tags/query_posts

    I’m not familiar with this plugin but you can hardcode this in your theme. I mention this for 2 reasons:

    1. Perhaps you can compare the code below to that of the plugin to get an idea
    2. For anyone else who might want to do this without a plugin

    The tag that outputs the date and time is <?php the_time() ?> and there are various arguments that can be used within the () In your theme you may have for instance Posted on <?php the_time('F jS, Y') ?> Modify it to read,

    Posted on <?php the_time('F jS, Y') ?>
    <?php $u_time = get_the_time('U');
    $u_modified_time = get_the_modified_time('U');
    if ($u_modified_time != $u_time) {
    echo " and last modified on ";
    the_modified_time('F jS, Y');
    echo ". "; } ?>

    This will output “Posted on BLAH BLAH and last modified on BLAH BLAH”

    Also remember admin95, most of these hacks are carried out automatically by bots/scripts rather than someone sitting there viewing source code of random websites. That said security through obscurity is not a bad thing. Every little bit helps. It’s just something else to think about.

    For the record, I too have WordPress plastered over all my site. There are many great tutorials all over the web (and in the Codex) on how to lock down your install.

    Forum: Plugins
    In reply to: Modify the Archives Page

    It would make it so much simpler when asking these types of questions if you guys could provide a link to the theme being used.

    Anyway, my guess is whatever template you’re using for the archive listing is set to show only POST TITLES … or … it is using the_excerpt. If the latter, that tag strips out ALL html. If your posts contain only images than obviously they will not display. You could alter the template used to display the archive listing to use the_content.

    Probably the easiest way is to view source code. The WordPress directories will be visible.

    Login to phpMyAdmin and run this query…

    DELETE from wp_comments WHERE comment_approved = '0';

    A warning: phpMyAdmin is a powerful tool for directly interacting with your database. Exercise caution as there is no “undo” button. You may want to make a backup prior to proceeding.

    You could also do this:

    Look in header.php for the call to the style sheet. It will look something like this…

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    We just need to wrap a few lines of code around it. Let’s assume the numerical ID of the page in question is 50.

    <?php if ( is_page('50') ) { ?>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/pg-50.css" type="text/css" media="screen" />
    <?php } else { ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"  type="text/css" media="screen" />
    <?php } ?>

    What this says is if we are on the page with the ID of 50 use the style sheet pg-50.css and if not then use the regular style sheet. By the way you can also style categories this way. Rather than using is_page you would use is_category

    View the source code for this link and tell me what you see –>

    http://74.125.95.132/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=cache%3Awww.tech-support-news.com%2F&meta=&btnG=Google+Search

    I’ll tell you what I see. More porn links than I can shake a stick at. You know what else I see? –> <meta name="generator" content="WordPress 2.3" />

    You’re running a computer/tech advice site and you haven’t upgraded your own software? Try searching this forum with keywords like “hacked” or “hack” etc. You’ll come up with lots of useful threads on how to proceed.

    Edit: I should add the above applies if the website we are talking about is yours. If not then just don’t go there until the webmaster cleans it up.

    WordPress doesn’t have a “default” htaccess per se. If you’re using the default permalink structure you won’t have that file. (unless you manually created it) If on the other hand you want to use so-called “pretty permalinks” WordPress will automatically create that file. Be advised that using “pretty permalinks” requires your server to have mod_rewrite (an Apache module that rewrites permalinks on the fly) enabled.

    Here is a very basic htaccess file using “pretty permalinks”

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Have you tried reverting to the default permalink structure then enabling pretty permalinks?

    Forum: Fixing WordPress
    In reply to: Show author

    On whatever theme file you want it to appear such as index.php (home page), single.php (single post page) etc

    Have a look at wp_list_categories

    Edit: after re-reading the two questions perhaps I should be more clear.

    Can I also hide the category from the “Categories list” in my sidebar?

    Yes. Peruse the link I gave you above.

    I’ll put a direct link under the Album of the Week picture. Is that possible?

    No need to insert a direct link. <?php the_category(', '); ?> will display a link to the category of the post. In your theme it could be used like Posted in <?php the_category(', '); ?> or something similar. More info on that here.

    if I click on the “hidden category” it doesn’t display any posts. It redirects me to the homepage without my hidden post.

    What theme are you using?

Viewing 15 replies - 526 through 540 (of 1,218 total)