CHEWX
Forum Replies Created
-
Forum: Plugins
In reply to: [Theme My Login] Redirect Login Url with parametersHi,
Yes. Create user-panel.php into your theme and then do some logic in there.
get_userdata( get_current_user_id() )->rolesThis will return an array of roles, and you can work from that.
Thanks
- This reply was modified 8 years, 4 months ago by CHEWX.
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] iCal for iOS?You need to use the
.icsfile extension.Open Safari, navigate to
yoursite.com/events.ics, will automatically open and ask if you want to import all.If you’re still having trouble please paste the whole
a href srcin here.- This reply was modified 9 years, 6 months ago by CHEWX.
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] iCal for iOS?Forum: Plugins
In reply to: [DsgnWrks Importer for Instagram] Instagram LinkI’ve just realised.
I’m using WordPress, which turns the link into an embeddable iFrame.
Hmmm, anyway to blacklist instagram URL’s, or is it a case of dequeue’ing wp-embed.js
Forum: Plugins
In reply to: [Twitget] Output ErrorDid you manage to replicate this issue.
I have just noticed on your own website you only have tweets from 2015, a good test would be to tweet and see if it shows.
Thanks,
TomForum: Plugins
In reply to: [Twitget] Output ErrorOn stablepizza.com if you scroll to the bottom.
Also on another website I created a plugin that piggy-bags yours https://ww.wp.xz.cn/plugins/twitget-media-add-on/ which is outputting just posts from 2015 which is odd.
Thanks,
TomYou can email me on tom [at] admire.agency if you wish.
Forum: Plugins
In reply to: [MailPoet Newsletters (Previous)] Newsletter Content -Custom FieldsResolved.
Forum: Plugins
In reply to: [MailPoet Newsletters (Previous)] Newsletter Content -Custom FieldsNo worries, I change the images from custom fields to featured images so they populated when inserting posts automatically.
Thanks
Forum: Plugins
In reply to: A bigger category box in WP Admin?There must be something conflicting with that function. The whole point of doing it in a function in the theme is so that you can update WordPress and the code will still work, but to answer your question, there most certainly is a way without ‘destroying’ other parts.
To debug, turn on debugging mode and debug log and check that when you get an error/black page.
The way you have done it is to edit the core, so when WordPress updates then it will more than likely get overwritten, this is bad practice.
Forum: Plugins
In reply to: A bigger category box in WP Admin?I’ve tested my end and works fine.
Try moving the function to the top.
<?php // Enlarge category box function chewx_admin_cat_height() { ?> <style> .categorydiv div.tabs-panel { max-height: 400px !important; } </style> <?php } add_action('admin_init', 'chewx_admin_cat_height'); //Short titles for preview link function short_title($after = '', $length) { $mytitle = get_the_title(); if ( strlen($mytitle) > $length ) { $mytitle = substr($mytitle,0,$length); echo rtrim($mytitle).$after; } else { echo $mytitle; } }Forum: Plugins
In reply to: A bigger category box in WP Admin?Ah, I tend to omit closing PHP tags, so that’s the error your getting.
Try:
<?php //Short titles for preview link function short_title($after = '', $length) { $mytitle = get_the_title(); if ( strlen($mytitle) > $length ) { $mytitle = substr($mytitle,0,$length); echo rtrim($mytitle).$after; } else { echo $mytitle; } } //Removing useless CSS that WP pasts right inside BODY tags... (?) function remove_gallery_css( $css ) { return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); } add_filter( 'gallery_style', 'remove_gallery_css' ); //Post thumbsnails support if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } //Left sidebar if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Left Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>')); } //Right sidebar if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Right Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>')); } //Main menu add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu' )) ); } //Thanks to http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/ for pagination function function pagination($pages = '', $range = 9) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo "<span>Page ".$paged." of ".$pages."</span>"; if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "« First"; if($paged > 1 && $showitems < $pages) echo "‹ Previous"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? "<span class=\"current\">".$i."</span>":"".$i.""; } } if ($paged < $pages && $showitems < $pages) echo "Next ›"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "Last »"; } } //Cumstom comments template function custom_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>"> <?php echo get_avatar( $comment, 64 ); ?> <span class="comment-author"><?php comment_author_link() ?> says: <?php if ($comment->comment_approved == '0') : ?> (!) your comment is awaiting moderation <?php endif; ?> </span> <small class="comment-data">" title="Permanent link to this comment"><?php comment_date('F jS, Y') ?> at <?php comment_time() ?><?php edit_comment_link('Edit', ' | ', ''); ?></small> <?php comment_text() ?> <div class="clear"></div> <?php } function chewx_admin_cat_height() { ?> <style> .categorydiv div.tabs-panel { max-height: 400px !important; } </style> <?php } add_action('admin_init', 'chewx_admin_cat_height');Forum: Plugins
In reply to: A bigger category box in WP Admin?Shouldn’t do that.
Can you copy and paste your whole functions.php file here – inc the above code placement. Remove anything that maybe sensitive.
Forum: Plugins
In reply to: A bigger category box in WP Admin?You’d need to copy and paste that code into your functions.php file in your theme.
Forum: Plugins
In reply to: A bigger category box in WP Admin?function chewx_admin_cat_height() { ?> <style> .categorydiv div.tabs-panel { max-height: 400px !important; } </style> <?php } add_action('admin_init', 'chewx_admin_cat_height');Not tested, but something like that in your functions.php
Forum: Fixing WordPress
In reply to: Query 'post_status' – WordPress Api V2Found the docs.