first load of the page gives 404 error
first load of the page gives 404 error
first load of the page gives 404 error
<?php $ck = get_post_custom_keys($post_id); //Array foreach ($ck as $k) { if (substr ($k, 0, 1) == ‘_’) { // skip keys starting with ‘_’ continue; } $cv = get_post_custom_values($k, $post_id ); //Array foreach ($cv as $c) { if (empty ($c)) { // skip empty value continue; } echo ($k . ‘: ‘ . $c . … Read more
You can do it in many ways. Two solutions I recommend are: 1. Editing category template Just edit your category.php template and put if statement in there: if ( is_category( array(15, 19) ) ) get_template_part(‘category-15-19’); else get_template_part(‘category-all’) Then just put code for category 15 and 19 into category-15-19.php file and code for other categories into … Read more
add_action( ‘wp_enqueue_scripts’, ‘ron_scripts’ ); function ron_scripts(){ if(is_home()){ wp_register_script( ‘homescript’, ‘/wp-content/themes/template/js/menu-home-open.js’ ); wp_enqueue_script( ‘homescript’ ); } else { wp_register_script( ‘nothomescript’, ‘/wp-content/themes/template/js/FILENAMEHERE.js’ ); wp_enqueue_script( ‘nothomescript’ ); } } alternatively replace is_home(); with any other method or code that determines what page you are on. ex: might work if(site_url() == get_permalink()){ //do home stuff } else { //do … Read more
Loading this code won’t have big impact on loading times. Of course you should make sure, that this code is only executed when it should be… But yes, it should be possible. Just make sure you don’t use it to early (when is_admin() return incorrect value). EDIT The code you’ve posted here should work just … Read more
Accept (once only) policy page on login
The problem was the mod_rewrite of Apache. I went in /etc/apache2/sites-available/000-default and I changed Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all to Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all the I restarted the apache server and all gone fine.
It sounds like this is a common bug in that version Adminimize. You might have better luck posting your question on WordPress.org under the plugin: http://wordpress.org/support/topic/184-breaks-featured-image-functionality
Why not automate the move from Drupal to WP? I think WP will fix some of the P tag issue during the upload. http://codex.wordpress.org/Importing_Content#Drupal If that isn’t an option, I think WP is using br’s instead of full new p. From the visual editor, I’d delete the copied break altogether and “enter” a new one.
Looks like you will have to use $meta = get_post_meta($post->ID, ‘_selected_post’, true); echo $meta; The registered post type is hidden using the _ and it’s name is defined at the line : $this->meta_key = “_selected_{$this->SELECT_POST_TYPE}”; Where SELECT_POST_TYPE is defined as ‘post’ at the line : var $SELECT_POST_TYPE = ‘post’; Hope it helps.