Forum Replies Created

Viewing 15 replies - 106 through 120 (of 126 total)
  • Thread Starter dains

    (@dains)

    I think maybe the large word “Optional” above the base word section and the words “If you like” in the text may be adding to the confusion. If pretty permalinks don’t work without a base word, it shouldn’t say optional, and it should be required before you can leave the screen so you can’t break your site (or at least that’s how I did things bitd).

    Still working on this. Changing the line is all fine and dandy, but I think most posters wanted control over the appearance and layout, and so do I 🙂
    I’ve tried editing it up the way I think it should be, but I’m experiencing an error- it just doesn’t work, although the code looks pretty simple and I don’t see any mistakes that I could have made.
    If I get anywhere, or I see a plugin that takes care of this, I’ll post it here.

    I’m highly interested too. All my comments are moderated, and the way the Codex says is to just put an “all comments are moderated” notice up. However, I’d really like a customizable message that shows up after so that I can put in a personal touch.

    I was looking at the way the comment form works, and it seems to cause WP to put #comment-(number) into the URL even if the comment is in moderation.
    So there’s some code telling WP to do something differently after a comment is posted.

    Does anyone know what we can use to trigger a message to be displayed? Something simple like having the message hidden by CSS display:none and rewriting it to show up when that “comment submitted” code goes off. That way it would only work once, when the comment is submitted.
    Thanks for any help!

    CTC has been updated several times, you can now select either Flat or List. Flat gives you the inline arrangement.

    Hmm, seems that modifying a theme that another developer has placed a distribution license on would bring your theme under their license. That really doesn’t have anything to do with WordPress.

    However, most themes are modified from themes were released with WordPress and GPL licensed- says so right in their CSS file. Therefore all of those themes are derivative works, and are licensed according to the original theme.

    Were you to start from scratch or a purchased template, and input the WordPress tags (or widgets) to make WordPress work with your theme, there would be no legal issue at all- it’s your theme, you’re just calling data and using system logic from WordPress and the widget makers.

    I’ve found that it’s actually not difficult to get a template, break up your template structure into the same PHP file structure, and put in the WP calls that you want.
    Even if you copy the WP functions used in other themes, that’s still not copying someone else’s original or creative design since those functions and parameters are provided by WP.

    It’s definitely some work, but if you’re developing for commercial purposes and need to make sure that your greedy, scummy competition doesn’t demand that you release your theme to the public so that they can download and use it for free, it’s the only safe road to using WordPress (or any other open source licensed platform).

    Thread Starter dains

    (@dains)

    That’s correct, the entire site is about “bicycles” or “cycling” or whatever else is the best, all-encompassing keyword for the content, which is then narrowed down by the category name/subcategory name (types of bikes, types of usage, whatever 🙂 This creates a very good readable and SE optimized link, which is the whole point of the pretty permalink, and a major part of my content design work 🙂

    The admin screen is pretty clear and I did my homework, so I don’t think there’s any way I’m messing this up. It says I can use any word I want as a category base, but that doesn’t work- only explicitly declaring “category” or “archive.php” (but not index.php) works.

    Leaving the category base blank does put “category” into the url, but IT DOESN’T WORK, which confuses the heck out of me.

    The fact that the tag pages ALWAYS work, no matter what is set, is a clue that there’s something wrong on the category side, but I don’t think we’ll get any farther hacking away at the problem.

    So I’m going to accept that there’s something wrong with something somewhere, but I put /category/bicycles/ into the category base and the site works now, so I have a workaround and it’s time to move on.

    Thanks for your help troubleshooting this Otto! Way to hang in there 🙂

    Thread Starter dains

    (@dains)

    It worked, and THAT is strange. Pretty permalinks won’t work without a specifically set category base of “category” (or “archive.php”) ??.

    But I can’t leave it blank, or use a keyword relevant to the content like “bicycles”, as it’s supposed to do.

    Does that help narrow down this problem? I’d really like it to work the way it says it should.

    Thread Starter dains

    (@dains)

    Well, what can I tell you? Adding archive.php to the category base turned the category link into homeurl/archive.php/categoryname/subcategory, and that works. I had tried a different category base before, and it didn’t help.

    I have no idea why, just like I have no idea why the basic setup didn’t work with homeurl/categorybase/categoryname/subcategory, but DID work with homeurl/tagbase/tagname.

    Oh and no category is named “category”. They’re all distinct terms which are directly related to the content to help with SEO.

    My guess about the index.php file was probably wrong, but I did say it was a guess. Knowledge is what you have coming out of school, not going in 🙂

    Thread Starter dains

    (@dains)

    I’d like to, but the site is closed until launch – you’d need an admin login to view it.

    I did find a workaround, by putting archive.php into the category base field, the category links work now. It’s ugly to have /archive.php/ in the link, but hey, it makes the rest of the custom permalink work.

    So this definitely is a WordPress issue and not a theme issue. I tried several themes, including the default, and they started showing Error:404 in the content section. Guess the guy who created my “custom theme” forgot to put the failover code in 🙁

    Does that fix give you any ideas as to what could be wrong? I searched the forums using different terms and found a lot of people complaining about blank pages being delivered from category links, so perhaps finding the root cause of this would result in a bug report.

    As a guess, I’d say index.php has something to do with it, since it’s explicitly referenced in the .htaccess file for rewrites. For reference, my custom designed theme was built around using archive.php for “more control over the code” (whatever that was supposed to help with), so my index.php is almost blank – only has this code in it:

    <?php get_header(); ?>
    <div id=”content”></div>
    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    .

    Well, that’s all for me. Time to get moving on all of rest of the work.

    Thread Starter dains

    (@dains)

    Hmm sorry, I’ll try to be more clear.

    I have a site with the regular category navigation list, and also a tag navigation list below that.

    The basic link for a category page is like http://www.homeurl.com/?cat=6. When you go into the Options/Permalink screen and enable Custom, then put in /%category%/%postname%/, it’s supposed to make your category permalinks into http://www.homeurl.com/category/subcategory, right?

    Well, it does do that- I get homeurl/category/subcategory when I mouse over the link, and when I look in the source code. And it does it for the tag links too- they become homeurl/tagname/.

    However, when I then click through a category link, I get a blank content page back. The header, sidebar and footer all display fine, but the actual content part just doesn’t return anything- the div is empty, not even the page title shows. Also, the name of the category that would normally be displayed in the document title in the header is also blank.

    The weird thing is that clicking through a tag link with the custom permalink on works fine- the articles all display perfectly, the page title is right, and the document title is right.

    Changing the permalink option away from custom to default fixes the problem immediately- everything works with the default link setup.

    So I’m assuming there’s some issue with permalinks, and I made sure that .htaccess was writeable, tried entering different things in the custom permalink field, made sure all plugins were shut off, all with no luck.

    So has anyone had this weird problem, or another problem with custom category permalinks just falling down like this?

    Thanks for any help!

    And fixed, thanks to the other post from Palamedes.

    Final code:

    function page_cats() {
    if (is_category() == TRUE) {
    $cat = get_query_var(‘cat’);
    echo(get_category_parents($cat, FALSE, ‘ ‘));
    }
    }

    Output –
    Parent Subcat
    in plain text for use in your browser document title 😀

    Huh, that explains why I don’t program PHP 😀 $cat is equal to the current category. I get why it works on a page and not in a function now. On a page it defaults to the current category, but in a function you need to define it.

    Now to look up how to define it in PHP lol. Thanks for your insight!

    Darn, can’t edit my previous post – sorry. I found that get_category_parents works if you put it directly on the page, but not if you put it in functions.php? I need to call it via the custom header function, so that’s my only remaining issue with this now. Can anyone tell me why this isn’t working?

    Header function snip:


    elseif (is_archive()) {
    print ‘ Articles in ‘;
    print page_cats();
    }

    // get cats function

    function page_cats() {
    echo(get_category_parents($cat, FALSE, ‘ ‘));
    }

    Thanks in advance for any help!

    Hmm ok, ran into another aspect of the same question. I have a function that displays a different document title depending on what page is being viewed (page, single and archive for the categories).

    Using the get_the_category_list tag and stripping the HTML let me customize the single page’s document title perfectly, because it apparently works with the post information – the document title shows all of the categories/subcats that the post belongs to.

    However, that won’t work for the category (archive) document title. Posts can have more than one category/subcategory, so it’s no good for just displaying the current category/subcategory as a navigation reference.

    after reading through the template tags and experimenting for hours, I can’t seem to find a WP tag to display both the parent and subcat in the document title for a category (archive) page. I’m looking to present something like “Articles in Parent1/Subcat”. Instead all of the category template tags I can find return just “Articles in Subcat”, which is confusing since I have more than one subcat with the same name.

    Does anyone know of an outside-the-loop tag that can show the parent and subcat of a current category in just plain text? I tried breadcrumbs plugins but they return full HTML with link code, and that doesn’t work for the document title – it needs to be clean text.

    Thanks for your past help, and any future too!

    Thanks Otto! It does give you the parent/subcat structure, but it also echoes the parents out afterwards (just like the_category), so you get parent1/subcat, parent2/subcat, parent1, parent2.

    The workaround is just not to check the post as belonging to the parents, so I guess I’ll have to do that.

    Strip_tags is awesome though, I can use that to clean up two other lists- thanks a bunch for that tip!

Viewing 15 replies - 106 through 120 (of 126 total)