Forum Replies Created

Viewing 15 replies - 256 through 270 (of 271 total)
  • Ryan

    (@daobydesign)

    Great fix not2bug.

    Just a quick note in case it gives anyone else a 1/2-second pause when they implement this and it doesn’t work — you’ll have to to resave your quotes.

    Ryan

    (@daobydesign)

    Was looking for a solution for this, but didn’t want to go the “all or nothing” approach outlined above. My solution is this:

    Step 1
    Create a new custom field called “allow_comments” and on any pages I want comments give that custom field a value (1, true, allow, whatever).

    Step 2
    Open up your theme’s page.php and find the following line:
    <?php comments_template(); ?>
    Replace with:

    <?php $allow_comments = NULL; $allow_comments = get_post_meta($post->ID,'allow_comments', false); ?>
    <?php if ($allow_comments[0]) { comments_template(); } ?>

    This checks to see if the page has a value for the allow_comments custom field. If it does, it displays the comments.

    With this in place in the page.php file (and not in the single.php file), by default it will not display comments for pages. But by adding the allow_comments custom field with (any) value, the comments mechanism can be quickly enabled for any page.

    Hope that helps someone else.

    Ryan

    (@daobydesign)

    Enable the Akismet plugin.

    Ryan

    (@daobydesign)

    Technically you don’t need the API key to get this plugin working — you can just enable Akismet. Though to get rid of Akismet’s persistent nag, getting an API key is a good idea — plus Akismet rocks.

    Why this plugin breaks without Akismet is another question entirely. Poor function checking it seems.

    Ryan

    (@daobydesign)

    @t31os_: Has anyone told you today that you’re fantastic? Well you are. Thx m8.

    Thread Starter Ryan

    (@daobydesign)

    I just noticed that link text is doing the same thing now — is this new to 2.9? Is there a way to turn off the title sanitizer?

    Ryan

    (@daobydesign)

    @otto42: Fantastic. Just fantastic.

    That really should be added to the page in the Codex dealing with creating sub-page conditionals.

    Ryan

    (@daobydesign)

    I just wanted to add that after banging my head against my desk for the last hour and reading about 20 other threads with no resolve, this thread made me reconsider my process as possibly being the problem and … it was.

    For anyone else having this problem, be sure to physically type each line if FTP information. This is particularly relevant to the password field – as I imagine most of us are copying and pasting long nonsensical password strings provided by our hosts in e-mails.

    As soon as I typed it in letter-by-letter it worked beautifully.

    Thanks for the simple reminder guys!

    Thread Starter Ryan

    (@daobydesign)

    This isn’t a solution exactly, but it did solve one of the thorns in using solution #1 above:

    Create the pages you want to use as menu items, but don’t make them children of any other page. Then to display them, simply use the wp_list_pages(‘include=ID1,ID2,ID3’) where ID1, ID2 and ID3 are a comma-separated list of the page IDs you want as your menu items.

    This gets around the issue of not having the “current_page_item” class added to the page you’re on (for CSS styling of the menu item).

    However, it doesn’t help organize the pages into a more semantical tree, as they’re all just in the main “Pages” bin.

    Thread Starter Ryan

    (@daobydesign)

    Thanks for the quick reply Bas.

    I’ve reinstalled the plugin, and then also re-copied all the core WP files just to make sure nothing was missing or corrupted – everything is working fine but this. Very bizarre.

    Adding to the weirdness is the fact that the override is functioning as intended on every other post. So, using the following code, I generate 6 posts:

    <?php query_posts('showposts=6&offset=0'); ?>
    <?php while (have_posts()) : the_post(); ?>
    	<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    		<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
    		<?php bdw_get_fpimg($post->ID); ?>
    		<div class="entry">
    			<?php the_advanced_excerpt('length=80&use_words=0&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,p,strong'); ?>
    			<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="read-more">read more</a>
    		</div>
    	</div>
    <?php endwhile; ?>

    You can see the result at https://openkyoto.com

    Post 1: the_advanced_excerpt template tag override works
    Post 2: doesn’t work, but advanced_excerpt’s default settings are used
    Post 3: works
    Post 4: doesn’t work
    Post 5: works
    Post 6: doesn’t work

    You can see this behavior repeats in the center column on the site as well. Even if I remove the center column (in case multiple query_posts calls were causing the problem) the result is the same.

    Any ideas?

    Ryan

    (@daobydesign)

    megami20, chillax a bit. You get what you pay for in these support forums.

    What the people are doing wrong is likely just not understanding how the plugin works – or more likely not understanding how WordPress works.

    If you want help though, you need to explain a bit more than “it’s not working”.

    First thing everyone needs to do is check their theme to make sure it is using <?php the_excerpt() ?> instead of <?php the_content() ?> where you’re looking for excerpt text to appear. You can do this under the APPEARANCE->EDIT menu in the backend (or just edit the php files in your theme folder via FTP).

    If none of that makes sense, then you need to take an hour or two and familiarize yourself with how WordPress themes work. If that all makes sense, come back and explain clearly what is and isn’t happening.

    Ryan

    (@daobydesign)

    This was killing me, no matter what I did I couldn’t get rid of an extra (empty) set of P tags being generated at the top of my post where I had inserted an image and caption (floating right).

    I tried disabling all my plugins and still the caption DIV was being wrapped in paragraph tags – which would then be forced out of the P tags, leaving them sitting there empty at the top of every post.

    Otto42’s example post didn’t help, because he had a couple lines of text before the image was displayed – and I was looking to put the image right at the top of the post.

    Solution: On a whim I decided to throw a couple extra line breaks in and see what happened – sure enough, worked like a charm.

    So, if anyone else happens to have trouble with this – in the HTML editor, make sure you put a full empty line between the caption code and your initial paragraph:

    Like:

    [caption id="attachment_5" align="alignright" width="330" caption="Mmmm... that looks tasty."]<img class="size-full wp-image-5" title="food" src="https://example.com/wp-content/uploads/2009/02/food.jpg" alt="Mmmm... that looks tasty." width="330" height="200" />[/caption]
    
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ornare accumsan turpis. Donec hendrerit metus non elit. Morbi egestas, lorem sed congue consectetur, pede turpis ornare urna, quis congue urna orci eget lectus. Maecenas sit amet augue a enim eleifend placerat. In cursus varius ante. Sed velit dui, sodales nec, pharetra in, accumsan a, nibh.

    Hope that helps someone.

    Thread Starter Ryan

    (@daobydesign)

    No one, eh?

    Thread Starter Ryan

    (@daobydesign)

    No one eh? I was afraid of that.

    Ryan

    (@daobydesign)

    ElasticDog, you’re a champ! Cheers, I was having the same problem, kept typing in “daobydesign” and it needed to be “DaoByDesign” – thanks so much.

Viewing 15 replies - 256 through 270 (of 271 total)