more tag in the $post->content when get_pages were used

You can use the WordPress function get_extended to fetch the different parts of a string (the part before and the part after the <!–more–> tag). get_extended returns an array with three keys, of which the keys main and extended are important: $arr[‘main’] contains the part before the more tag, and $arr[‘extended’] the part after the … Read more

add_rewrite_rule: Issue converting path to url

The path should just start with wp-content because the generated rewrite rule (which would be added to your .htaccess) is relative to your WordPress installation directory: function addCheckoutRedirect() { add_rewrite_rule( ‘tradeIns’, // I intentionally removed the caret (^) ‘wp-content/plugins/pluginNake/templates/checkout.php’, ‘top’ ); } And here’s how your .htaccess file may look like after the addition of … Read more

Hide Visibility Option From WordPress Publish Metabox

Add this code: function wpseNoVisibility() { echo ‘<style>div#visibility.misc-pub-section.misc-pub-visibility{display:none}</style>’; } add_action(‘admin_head’, ‘wpseNoVisibility’); to functions.php of your active theme. Needless to say, the preferred method, would be to add above code to functions.php of the child theme. Update Unfortunately, the above solution will not limit this change to pages only. We’ll have to determine, if we add, … Read more

Debugging shortcode problems

As @Milo said, wordpress.com is a platform on its own, and everything available on wordpress.com is only available to sites hosted on wordpress.com. The jetpack plugin does however make some features available to self hosted sites but I’m not particulary sure which ones. The shortcodes you are talking about is only available on sites hosted … Read more

WordPress protected Pages

The protected post system uses POST so by default, no you can’t. However, here is a bare-bone mechanism that will let you do this. function bypass_protected_post() { if (is_single()) { global $post,$_GET; if (isset($post->post_password)) { $bypasskey = get_post_meta($post->ID, ‘bypasskey’, true); if (isset($_GET[‘bypasskey’]) && $_GET[‘bypasskey’] == $bypasskey) { $post->post_password = null; } } } } add_action(‘wp_head’,’bypass_protected_post’); … Read more

Too many pages causes WordPress admin to be unusable

Unfortunately the details you’ve provided are a bit limited. For example, what sort of hosting are you on and what sort traffic are you dealing with here? If you have a shared hosting account then you should know that shared hosts provide you with limited cpu and memory resources as it’s shared across multiple hosting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)