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
function restrict_articles_by_issue() { | |
global $wpdb; | |
$issues = $wpdb->get_col(" | |
SELECT DISTINCT meta_value | |
FROM ". $wpdb->postmeta ." | |
WHERE meta_key = 'issue' | |
ORDER BY meta_value | |
"); | |
?> | |
<label for="issue">Issues:</label> |
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 | |
/* | |
Plugin Name: AlphansoTech Plugin | |
Description: Plugin for testing purpose | |
Version: 1 | |
Author: AlphansoTech | |
Author URI: http://alphansotech.com | |
*/ | |
add_action('admin_menu', 'at_alphansotech_menu'); |
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
HTML PART : | |
<div class='extdiv'> | |
<input type="text" class="addmore" /> | |
</div> | |
JQUERY CODE : | |
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.min.js"></script> |
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(get_post_meta($post->ID, '_Prifix_url_target', true) == "standard" ) | |
{ ?> | |
<a href="<?php echo get_post_meta($post->ID, '_Prifix_URL_link', true) ?>" target="_blank"> | |
<h1><?php the_title(); ?></h1> </a> | |
<?php } | |
else if(get_post_meta($post->ID, '_Prifix_url_target', true) == "custom" ){ ?> | |
<a href="<?php echo get_post_meta($post->ID, '_Prifix_URL_link',true) ?>" > | |
<h1><?php the_title(); ?></h1> </a> | |
<?php | |
} |
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
// Product Page Image Seting // | |
<?php | |
error_reporting(0); | |
function woocommerce_template_loop_product_thumbnail(){ | |
global $product; | |
$link = get_permalink( $product->id ); | |
$imgsrc_full = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "full"); | |
$imgsrc_thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "thumbnail"); | |
?> | |
<a href="<?php echo $link; ?>"><img src="<?php echo $imgsrc_thumbnail[0]; ?>"/></a> |
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 wpforce_featured() { | |
global $post; | |
$already_has_thumb = has_post_thumbnail($post->ID); | |
if (!$already_has_thumb) { | |
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); | |
} |
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 | |
define('FS_METHOD','direct');define('FS_CHMOD_DIR',0755);define('FS_CHMOD_FILE',0644); | |
define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/uploads'); | |
?> | |
--------------------------------------------------------------------- | |
<?php | |
/* Absolute path to the WordPress directory. */ |
NewerOlder