how to get category name if my category got custom slug
See http://codex.wordpress.org/Function_Reference/get_term_by The following code will work for your situation: $cat = get_term_by( ‘slug’, ‘aeroplane’, ‘category’); echo $cat->name;
See http://codex.wordpress.org/Function_Reference/get_term_by The following code will work for your situation: $cat = get_term_by( ‘slug’, ‘aeroplane’, ‘category’); echo $cat->name;
No need for a plugin; see the docs for the parameters of next_post_link and previous_post_link http://codex.wordpress.org/Function_Reference/previous_post_link http://codex.wordpress.org/Function_Reference/next_post_link
WordPress is based on PHP. The dynamic data is stored in a MySQL-Database. For viewing the front- & backend HTML and JavaScript are used. For special operations like the media-upload there are also used technics like Flash and Silverlight. As developer of themes or plugins u can use every programming language for web development.
When you say developer, I immediately assume you mean someone trying to add content to the site? There is a WordPress app that you can add your site to, and add Posts, pages, view stats, etc.
I can’t bee too specific answering your question, but you can certainly use a $wpdb instance to access another database: $db = new wpdb(‘user’, ‘password’, ‘dbname’, ‘dbhost’); $results = $db->get_results(‘..query..’);
You’re using a get function, which does not echo by default. Update the PHP portion to the following: <?php echo wp_get_attachment_image($image, ‘category-large-thumb’ ); ?> Also, wp_get_attachment_image() returns a full image object – so I don’t think that’s what your after. It also most seems like you’d just want the_attachment_link: <?php the_attachment_link( $id, $fullsize, $deprecated, $permalink … Read more
I prefer to use get_the_ID() for things like that, which will return the ID of the current page/post. $mjrelatedproducts = get_brands( get_the_ID() )->slug; That should return the slug of the current page/post.
You can try this. $args = array( ‘parent’ => 100, // id of the direct parent ‘hide_empty’ => false, ); $cats = get_terms( ‘product_cat’, $args ); foreach( $cats as $cat ) { // do your loop stuff here } Here is more information on this function and additional arguments you can use.
you get this error if you passed empty string or did not pass any argument to the __() function. You should check where you’ve used the __() function and check what value is being passed as argument.
You can not execute functions inside the do_shortcode() call like you are trying to. If you are just trying to wrap your post meta content with the shortcode, then you can do it like shown below. $your_post_meta_variable_content = get_post_meta( $postid, principal_1, true ); echo do_shortcode( ‘[learn_more caption=”ancila”]’ . $your_post_meta_variable_content . ‘[/learn_more]’ );