New answers tagged

-1

maybe try <?php instead of <? in your lines of code, not sure but I understand that this can cause problems. or use <?php echo $post->post_content; ?> and try without 'Read More' means only <?php the_content(); ?>


1

echo $post->post_content; will echo your post content. Keep in mind though, it's raw out of the database (same as get_the_content()). If you want to apply the same filters that the_content() receives, follow the instructions in the codex: <?php $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); ...


1

Try this, home it will work properly. just replace 'taxonomy' with your taxonomy and post type in wp_query. <?php $categories = get_terms('taxonomy', array('orderby'=>'name','hide_empty' => 0)); foreach( $categories as $category){ $category_link = get_category_link($category->ID); $args = array('post_type' => 'post', ...


0

This is also possible trick, but you need to put this in your wp-config.php since WP_DEBUG is defined in there: if ( isset( $_GET['debugsecret'] ) && 'debugsecret' == $_GET['debugsecret'] ) { define( 'WP_DEBUG', true ); } Add ?debugsecret=debugsecret to the page URL you like to debug.


0

This is a much simpler solution - add the following to your functions.php file: add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == 'primary' ) return $items."<li class='menu-header-search'>".get_search_form(false)."</li>"; return ...


1

Wordpress errors are application level errors. PHP errors are language syntax or usage errors and appach error are errors detected during the web server operation. Errors, especially minor ones, might be reported "upwards" and look like they are wordpress application errors, or logged downwards and be part of the apache server error log if the applications ...


1

I figured out what was causing this, but it was by trial and error since there was no good debug info. And the error was in the main (custom post calling) part of my plugin, NOT in the options as I had surmised earlier. I ended up finding out that I needed to be using 'content' => $p->post_content in my query/foreach loop in place of 'content' ...


0

While not directly an answer to the question at hand, it should probably also be noted here that by default WordPress adds a class name to the <body> tag for custom page templates. So for instance, if you are viewing a page that has a custom page template, and the template's filename is custom.php, then a class name of page-template-custom will be ...



Top 50 recent answers are included