This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| pt o singura adresa in loc de id pun 'all' | |
| !!!Asta e pt mai multe locatii: | |
| if( function_exists( 'wpseo_local_show_map' ) ) { | |
| $params = array( | |
| 'echo' => true, | |
| 'id' => 804, // this is the post id from the Albany post in the Locations CPT | |
| 'width' => 460, | |
| 'height' => 296, | |
| 'zoom' => 12, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create post object | |
| $my_post = array( | |
| 'post_title' => 'My post', | |
| 'post_content' => 'This is my post.', | |
| 'post_status' => 'publish', | |
| 'post_author' => 1, | |
| 'post_category' => array(8,39) | |
| ); | |
| // Insert the post into the database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo do_shortcode('[gallery]'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://codex.wordpress.org/Function_Reference/the_widget | |
| class My_Custom_Widget extends WP_Widget | |
| { | |
| /* your code* / | |
| } | |
| <?php the_widget( 'My_Custom_Widget' ); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| !!!!! Daca vreau ca pozitia in pagina sa fie retinuta si dupa submit: | |
| <form method="POST" action="" onSubmit="this.scrollPosition.value=document.body.scrollTop"> | |
| <input type="hidden" name="scrollPosition"> | |
| <input type="submit" value="Send Message"> | |
| </form> | |
| <body onLoad="window.scrollTo(0,<?php echo $_POST['scrollPosition'];?>)" <?php body_class(); ?>> | |
| !!!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $max_articles = 7; // How many articles to display | |
| echo '<h3>Related Topics</h3><ul class="related-topics">'; | |
| $cnt = 0; | |
| $article_tags = get_the_tags(); | |
| $tags_string = ''; | |
| if ($article_tags) { | |
| foreach ($article_tags as $article_tag) { | |
| $tags_string .= $article_tag->slug . ','; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul> | |
| <?php | |
| global $paged, $wp_query, $wp; | |
| if ( empty($paged) ) { | |
| if ( !empty( $_GET['paged'] ) ) { | |
| $paged = $_GET['paged']; | |
| } elseif ( !empty($wp->matched_query) && $args = wp_parse_args($wp->matched_query) ) { | |
| if ( !empty( $args['paged'] ) ) { | |
| $paged = $args['paged']; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -moz-column-count:2; /* Firefox */ | |
| -webkit-column-count:2; /* Safari and Chrome */ | |
| column-count:2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form action="<?php bloginfo('url'); ?>/" method="get"> | |
| <?php | |
| $select = wp_dropdown_categories('show_option_none=Select Category&show_count=1&orderby=name&echo=0&selected=6'); | |
| $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select); | |
| echo $select; | |
| ?> | |
| <noscript><input type="submit" value="View" /></noscript> | |
| </form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://buckwilson.me/lightboxme/ | |
| jquery.lightbox_me.js: | |
| /* | |
| * $ lightbox_me | |
| * By: Buck Wilson | |
| * Version : 2.3 | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); |