How to remove the excerpt in the Dzonia Lite theme
You just need to replace this line: <?php the_excerpt(); ?> With this line: <?php the_content(); ?> That should insert your post’s content instead of an excerpt.
You just need to replace this line: <?php the_excerpt(); ?> With this line: <?php the_content(); ?> That should insert your post’s content instead of an excerpt.
Well… You’ve already used wp_enqueue_style. Use it again. That is the canonical mechanism for loading stylesheets either by itself or in combination with wp_register_style wp_enqueue_style(‘blackberry’,get_stylesheet_directory_uri().’/path/to/blackberry.css’); I feel compelled to note that user agent sniffing is not especially reliable. Is it not possible to do this with media queries? Reference http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri
SOLVED! I find that GET is not working at all! You need to use POST and in the form action you need to type this: action=”<?php admin_url(‘options-general.php?page=DD_Awesome_Plugin/DD_awesome_plugin.php’); ?>” Damn! It’s sometimes so hard to do simple task in WP 😉
get_sidebar() accepts a parameter $name. Then will look for a file sidebar-{$name}.php. So what you can do is: get_sidebar( get_post_type() ); // search for sidebar-post.php or sidebar-page.php or: if ( in_category( array( ‘featured-listing’, ‘listing-post’ ) ) ) get_sidebar( ‘listing’ ); // sidebar-listing.php else get_sidebar();
… the post->ID won’t return anything if it’s before the loop Generally speaking, this is false. The $post variable is set well before the Loop starts in your theme, for most pages. The main query “primes” that variable to the first post in the Loop. That said, depending on this variable outside the Loop is … Read more
You would have to JOIN a couple of tables. SELECT meta_value FROM wp_postmeta as pm INNER JOIN wp_term_relationships as tr ON (pm.post_id = tr.object_id) INNER JOIN wp_term_taxonomy as tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE 1 AND tt.taxonomy = ‘laptop’ AND pm.meta_key = ‘quantity’ I am fairly sure that is right. These things are complicated. If … Read more
WordPress is still adding slashes to data sent per POST, so yes, in some cases you might have to remove the slashes. There are two options: Use stripslashes_deep( $value ). This function accepts an array, an object or a string and removes the slashes. Get POST data per: $data = file_get_contents( ‘php://input’ ); This takes … Read more
Unfortunately there is no system in WordPress to handle dependencies and sharing components between extensions is a challenge. The possible solutions roughly are: make shared part a plugin and require each plugin to require it (and possibly auto install/activate) implement loader that will take care of processing versioning for shared part and take care of … Read more
I don’t have any experience with Yii, but looking at their Wiki there are already some solutions: Integrating WordPress and Yii,Working Out The Details. Integrating WordPress and Yii: still another approach, using Yii as the router/controller Integrating WordPress and Yii: yet another approach Integrating Yii with WordPress Run an Yii Application inside an WordPress page … Read more
Ideally, place this in a plugin (so it’s not overwritten when you update the theme): function wpse_106185_elist_categories( $args ) { return $args + array( ‘depth’ => 1, ); } add_filter( ‘listing_categories_args’, ‘wpse_106185_elist_categories’ ); Alternatively, a quick fix is to edit this line… $elist_categories_args = array( ‘hide_empty’ => 0 ); To… $elist_categories_args = array( ‘hide_empty’ => … Read more