« first day (384 days earlier)      last day (4560 days later) » 

12:41 AM
0
Q: What ever happened to the WPSE blog?

WyckThis was brought up a while back, WPA Community Blog, I think it's a great idea. I did not even know about stack blogs until I read the post today from thier "official" one. I don't really have a blog of my own, so I would be able to help out. Thoughts? Reference and guidlines: http://blogover...

 
 
8 hours later…
8:55 AM
morning all
what a glorious day here in the UK /s
 
hi...
 
9:23 AM
moaning
 
9:46 AM
whats the name of the plugin that will create a POT file for your theme?
I just want to generate a POT file for my theme so I can send it off to be translated
 
codestyling localization
 
^^ lol I would have never found that
thx rarst
 
10:08 AM
ummm doesnt generate the POT file
it allows you to do the translations in WP I just need to make the POT file
 
it should
 
the POT file is blank...
 
 
2 hours later…
11:45 AM
anything wrong with this:
add_filter( 'getarchives_where', 'sc_hi_rezz_getarchives_where', 10, 2 );
function sc_hi_rezz_getarchives_where( $where, $args ) {
    global $wpdb;
    if( isset( $args['post_type'] ) ) {
        return str_replace( "post_type = 'post'" , "post_type = '{$wpdb->escape( $args['post_type'] )}'" , $where );
    }
    return $where;
}
made that to allow wp_get_archives() to take post_type param
that way I can use the function to output CPT archives in sidebar
 
12:15 PM
has anyone here got a CPT to work the same way as posts?
cos I cannot get date archives working at all for my CPT
 
1:01 PM
@Rarst you there?
 
kinda
 
I need your opinion on something
previously I said this in chat:
in WP is it possible to get nav items to show selected status if on a single news item
I have the news page set to my page of posts
if I go to the news page the nav item gets the correct css class added to say im on the news page
but if I go to read a single post or go to an archive (selected category) the nav item loses its class
is there a way to retain this class on the menu?
I think I've found a way to rectify it but was wondering if the way ive done it is good enough
add_filter( 'nav_menu_css_class', 'sc_hi_rezz_nav_menu_css_class', 10, 3);
function sc_hi_rezz_nav_menu_css_class( $classes, $item, $args ) {

    static $post_type;
    static $on_pages;

    if( ! $post_type ) {
        $options = get_option( 'hi_rezz_theme_options' );
        $post_type = get_post_type();
        $on_pages = array(
            array(
                "page_id" => get_option( 'page_for_posts' ),
                "post_type" => "post"
            ),
            array(
                "page_id" => $options[ 'sc_cpt_cas_study_page' ],
basically I find what page ID is set for each of my post types (in this case just posts page and a page for case-studies
 
seems.... nicely indented. my brain hadn't gone on today yet
 
shame :(
Im not to worried about the code at the top because of static declaration so stops it running 100 times. But its the bottom time that will run every time a menu item is displayed
in my case there is 13 menu items on any one page so that foreach checking runs 13 times.
is that a significant load add?
 
1:56 PM
hey @kaiser
 
@Brady jo
 
what you think to the above code?
 
ehm... pretty much same situation as @Rarst little braindamaged today
 
it's friday... in november... :)
 
:)
@Brady: Where u use this: $options = get_option( 'hi_rezz_theme_options' );?
ah. found
 
2:02 PM
its where I store the page ID of the posts page for my CPT
create my CPT like this:
$options = get_option("hi_rezz_theme_options");
    $pagepermalink = get_permalink($options['sc_cpt_cas_study_page']);
    if($pagepermalink) {
        $home_url = home_url();
        $pagepermalink = ltrim(rtrim( str_replace( $home_url, "", $pagepermalink ), '/'), '/');
    } else {
        $pagepermalink = "case-studies";
    }

	$args = array(
		'labels' => $labels,
        'public' => true,
        'has_archive' => $pagepermalink,
		'supports' => array('title', 'editor', 'thumbnail'),
        'rewrite' => array(
so the permalink is based on the selected page
ahhh anyone know how to make date based archives work for a CPT
 
Just watching Otto & Nacin Video from WC Montreal. Are they from Texas?
 
2:55 PM
I think Nacin is from DC
 
3:22 PM
i am so tired i could punch a donkey
2
 
 
2 hours later…
5:44 PM
k guys. wish you a nice night. bye!
 
 
1 hour later…
6:54 PM
does anyone know of a plugin or a function that can make post into subpost
im trying to get the url structure of mysite.com/category/post/subpost
i know i could make a sub category but with that im doing it would be over 1k categories and thats too much
 

« first day (384 days earlier)      last day (4560 days later) »