This file contains 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 | |
/*use print_r($user_profile['field_name']); to check out the array */ | |
/*Some examples of this method */ | |
<li><?php print $user_profile['field_drzava']['#title'] ?>: <?php print $user_profile['field_drzava'][0]['#markup'] ?></li> | |
<li><?php print $user_profile['field_tel_']['#title'] ?> <?php print $user_profile['field_tel_'][0]['#markup'] ?></li> | |
<li><?php print $user_profile['field_fax_']['#title'] ?> <?php print $user_profile['field_fax_'][0]['#markup'] ?></li> | |
<li><?php print $user_profile['field_sjediste_firme_']['#title'] ?> <?php print $user_profile['field_sjediste_firme_']['#items'][0]['value'] ?></li |
This file contains 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 | |
$username = $node->name; | |
print $username; | |
?> |
This file contains 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 if($node->type=='node-type-name'){ ?> |
This file contains 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 | |
$post_id = $wp_query->post->ID; // get post ID | |
?> | |
<h2><?php echo get_the_title($post_id); ?></h2> | |
/* If using WPML for translation then */ | |
<h2><?php echo get_the_title(icl_object_id($post_id, 'page', false)); ?></h2> |
This file contains 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
Add this to Preferences - Settings user | |
"tab_size": 8, | |
"translate_tabs_to_spaces": true, | |
"auto_indent": true, | |
"detect_indentation": false |
This file contains 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 | |
$trenutnovrijeme = strtotime('now'); | |
query_posts( array( | |
'post_type' => 'javna-nadmetanja', | |
'orderby' => 'wpcf-datum-objave', | |
'meta_key' =>'wpcf-datum-zatvaranja', | |
'meta_compare'=>'>' , | |
'meta_value' => $trenutnovrijeme, | |
'order' => DESC, | |
'showposts' => 10, |
This file contains 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 | |
global $more; | |
$more = 0; | |
the_content(''); | |
?> |
This file contains 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 | |
function add_category_automatically1($post_ID) { | |
global $wpdb; | |
if(in_category(7)){ | |
$cat = array(10); | |
wp_set_object_terms($post_ID, $cat, 'category', true); | |
} | |
} | |
add_action('publish_post', 'add_category_automatically1'); |
This file contains 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-document url-prefix() { | |
ul.nav li a { | |
padding:0 15px 2px 15px; | |
} | |
} |
This file contains 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
To fix this, please perform the following: | |
Open Preferences > Browse Packages… | |
Navigate into the SFTP/ folder and open SFTP.py in Sublime. | |
Without making any modifications, save the file. Sublime SFTP should now be fully functional again. |