Posts by OriginalEXE

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

can it be used in combination with woocommerce instead of EDD?

Only EDD is supported.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

Hi,

well using plugin is quite simple, but to connect it all together will require some work and understanding on your part, it’s not an automated process, simply a tool to achieve structure you need.

Idea is to use

add_term_meta($term_id, $meta_key, $meta_value, $unique)

to store id’s to the author term, and those id’s would represent id’s of portfolio item terms that are connected to that author term.

Then on author term page, you would use

get_term_meta($term_id, $key, $single)

to fetch portfolio terms id’s, and do what you need with them.
1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

I know, I understood what you are trying to do.

The plugin I linked to does not add additional UI fields to the tags/categories edit screen, it just enables you functionality to define meta values and bind them to specific terms.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says
Hi, custom taxonomy metadata is not supported right now, you can check discussion here: https://core.trac.wordpress.org/ticket/10142 Also, check this plugin which implements some ideas from that discussion: http://wordpress.org/plugins/taxonomy-metadata/
1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

No problem.

Based on your SQL above, I believe this should do the same job:

$args = array(
    'orderby'  => 'meta_value_num',
    'meta_key' => 'post_views_count',
    'fields'   => 'ids',
)

$posts_array = get_posts( $args );
1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

Hi,

1.) Always use $wpdb->prepare on your custom queries, read: http://ottopress.com/2013/better-know-a-vulnerability-sql-injection/

2.) Why not use get_posts() instead of a custom query. You can use ‘fields’ parameter in arguments array to only load post id’s, read: http://codex.wordpress.org/Class_Reference/WP_Query#Return_Fields_Parameter

3.) Use WordPress transients API: http://codex.wordpress.org/Transients_API to cache your query result. Don’t forget to also empty it once new post of that post type is made.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

page_data is not a function. Let me explain.

You have this:
 $pages = get_pages($args);

Your $pages variable now contains an array of objects, and each object represents one page that matched your request.

Then, you are doing foreach:
foreach ($pages as $page_data) {

which iterates over every member of your $pages array, and stores each member (page object) into a variable you named $page_data.

$page_data variable now contains all the data you pulled from the database in form of an object, and you access each property of the object using an “arrow” ->, unlike in array where you would use [’’]

So when you call
$page_data->ID
, you are accessing object property named “ID”, which actually holds ID of that page object.

I hope I made it clearer.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

Note: You don’t have a contact form on your profile, only authors do.

Just click on a green button here: http://themeforest.net/author_guide

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

Why not simply:

$postid = $page_data->ID;

By calling get_the_ID(), you are retrieving an id of the post/page in the main query (you will get back id of the post/page you are running this query on).

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

I get $2+ purchases in 80% of my transactions.

Instead of looking at it as an additional charge, one can view it as a discount if deposit is made.

by
by
by
by
by
by