lalaalaaa
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Exclude posts with certain post formats in query_postsIt’s not that difficult, you just have to read carefully, since there are no examples! ?? Rev. Voodoo’s link had the answer in the operator parameter.
Try:
<?php $args = array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-XYZ', 'operator' => 'NOT IN' ) ) ); query_posts( $args ); ?>
Replace “XYZ” with the post format you want to exclude.
Hi, I tried the code above, but got a 404 error… I removed the line
$link = str_replace('?u=', '&u=', $link);
and I could get to the Post page, but it posted as a Post still, instead of the Bookmark post type.I then changed the
$link = str_replace('post-new.php', "post-new.php?post_type=$post_type", $link);
topress-this.php
— but it still posts as a Post, not the custom typeFinal code changes that I made:
<?php function press_this_ptype($link) { $post_type = 'bookmark'; $link = str_replace('press-this.php', "press-this.php?post_type=$post_type", $link); //$link = str_replace('?u=', '&u=', $link); return $link; } add_filter('shortcut_link', 'press_this_ptype', 11); ?>
Any help would be greatly appreciated!
====================================================================
EDIT: I had a typo earlier in my function.php file — the original code worked perfectly for me!Forum: Plugins
In reply to: Create a private forum with bbPressThis is probably your best option:
https://www.adityanaik.com/projects/plugins/bb-private-forums/It hasn’t been updated recently, but has been used by several people with the most recent update of bbPress, so it should be fine.
Or, if you want all forums to be private, what I’ve done is add a conditional statement to the top of the page. (If logged in, show the forums; if not, show the login page.)
Forum: Fixing WordPress
In reply to: Page Jumps When LoadingI’m experiencing a the same problem. I’ll let you know if I find any info about it.
Forum: Fixing WordPress
In reply to: List posts with the same category name as the page title nameBrilliant!!
You’ve made my day; thank you!
Forum: Fixing WordPress
In reply to: List posts with the same category name as the page title nameI can define the name I want, so now the issue is just getting it to work inside the query:
$topic = sanitize_title($post->post_title);
Forum: Fixing WordPress
In reply to: List posts with the same category name as the page title namePerhaps I could us a long line of
if
statements (if page title is this then query post with category this) but then I might as well create a unique page template for each — I imagine there must be something simple I’m missing!Forum: Plugins
In reply to: [Plugin: AmR iCal Events List] Error in HTML description formattingThe second
<br />
should have no space and close.
(WordPress corrected the format!)Forum: Plugins
In reply to: [Plugin: AmR iCal Events List] Error in HTML description formattingWhoops! Let’s try that again: <p>The plug-in is working great mostly — except for the Description area.</p>
I’ve formatted the ‘Description’ area in the calendar using HTML (p, br, , etc), it mostly works.
I know somewhere it’s reformatting the Description:
<br />
becomes
<br />
Annoying. But also:
<a href="example.com">
becomes
<a href="\"example.com\"">
Totally unusable.
I’ve been wading through the PHP, but I can’t figure out where it’s getting messed up. Any thoughts would be very much appreciated!
Thanks,
Christina