Remove password protection from all posts
You can do that by running this SQL query: UPDATE `wp_posts` SET `post_password` = ” WHERE `post_type` = ‘post’; Change wp_posts to match your own posts table name.
You can do that by running this SQL query: UPDATE `wp_posts` SET `post_password` = ” WHERE `post_type` = ‘post’; Change wp_posts to match your own posts table name.
One way to access WordPress core functionality outside of your WordPress directory is to use the following example; <?php require( ‘../path-to-your-wordpress-install/wp-load.php’ ); get_header(); // do your magic here… get_footer(); ?> However converting HTML to WordPress shouldn’t really require you to access WordPress outside of itself. Instead you want to be porting across the clients HTML … Read more
The permalink structure you’ve described above e.g…./hotels/hamburg/features/sea-face isn’t really something that could be achieved by using custom fields. You would be better off creating a new taxonomy called ‘features’ and populating it with terms like ‘sea-facing’ and any others. In order to do queries for multiple taxonomies I would recommend the excellent Query Multiple Taxonomies … Read more
You need to add the global $wpdb reference and also add the second parameter required for prepare(): global $wpdb; $post_id = $post->ID; $reviewScore = $wpdb->query( $wpdb->prepare( “SELECT review FROM {$wpdb->prefix}gdsr_data_article WHERE post_id = %d”, $post_id ) );
A better, cleaner way to do this would be to use proper string return methods and concatenation. I say this, because you’re trying to put functions that echo content (i.e. the_title() into a variable – this won’t work!!! Instead: $text=”<form><td>Permalink to: “; $text .= get_the_title(); $text .='</td><textarea cols=”85″ rows=”2″ readonly=”readonly” onclick=”select()”/>’; $text .= get_permalink( $id … Read more
The issue is that your plugin should not be outputting anything to the browser on init. As you can see by the error, some code in pluggable.php is trying to set a header, but headers were already sent when your plugin sent output. If you want to output markup, you have to hook something in … Read more
query_posts = _your_doing_it_wrong as soon as you throw in that nasty query_posts you are killing off all the global variables and your paging will not work. change: query_posts( array( ‘post_type’ => ‘fieldtrips’, ‘fieldtripcategory’ => ‘elementary-school-aquifer’, ‘order’ => ‘ASC’, ‘posts_per_page’ => 1 ) ); if ( have_posts() ) : while ( have_posts() ) : the_post(); to: … Read more
This sets $options to the value of test_theme in the database, you can go to phpmyadmin and the wp database and the wp_options (if wp is your prefix) and do a search on option_id row and you’ll find it there. To get this option it should be saved before in the database using add_option() and … Read more
The problem is your use of return is not appropriate here, it’s stopping execution of the template. You should echo your output.
You have to add a custom walker to the wp_get_nav_menu. You can try a loop through wp_get_nav_menu_items as well