carosea
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] DomPDF usageoops sorry I posted in wrong place
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] DomPDF usageI have a different static file associated with each base product in a composite product. Each element of the composite product has an associated PDF file name store in a custom field.When an order is placed
I want to be able to pass the custom field value for each of these elements into static file fields on the PDF invoices & packing PRO version so that the name of each product element ordered and their associated PDF file name is emailed to another departmenet.Is this possible?
Hi
Please can you tell me if this product Woocommerce Product Designer will allow me to set up templates for A5 cards birthday cards etc… so the PDF produces a flat A4 page print which could then be folded for the cardForum: Plugins
In reply to: [Broadcast] parent child post fieldYes I realise that but I thought that with Broadcast you specify the pages/posts that are linked for broadcasting purposes and if I can’t find out how to link the parent / child posts in the first place then how can I get Broadcast to share information across them? Sorry if I have got the wrong end of the stick and Broadcast won’t allow me to share a custom field between two ‘related’ posts?
Forum: Plugins
In reply to: [Broadcast] parent child post fieldWhen you create a page there is a ‘page attribute’ option and you can select a parent page.
This doesn’t appear when you create a post though – I suppose I could create a custom field ‘parent_post’ and assign the name of it manually but I thought there is a way to make the functions associated with pages available to posts.
In my set up there is only going to be one child per parent (I think).Forum: Plugins
In reply to: [WP Tiles] make tile random colors not repeat togetherOh and when I tried putting 7 colors in as shortcodes it wouldn’t take more than 4?
Forum: Plugins
In reply to: [Calculated Fields Form] pass field variables to another page phpThanks for the reply but I have bought the Premium version of the plugin as I had been reading about the use of the Thank You email attribute to pass variables to another page (and display as results). I have tried using them in the html page but think perhaps it would be more flexible and useful to create a template.php for the search results page and pass these field results to this page – if I did this would I then be able to declare these variables as global and use them to create search queryies?
Forum: Plugins
In reply to: [Calculated Fields Form] add more checkboxesThanks for the quick reply .. and sorry to have bothered you I just discovered it myself.
Forum: Plugins
In reply to: [WP Tiles] put calculated value in bylineMike
I have returned to this – which I think is what you originally suggested – the wp byline template part is fine and prints an age correctly I just think my problem is still getting the variable $birthdate to be used correctly – it doesn’t like it – if I hard code $birthdate as YYYY-MM-DD into
list($year, $month, $day) = explode( "-", '1998-03-26');it works fine for that one example but I can’t get it to read the variable being passed through – or at least it maybe passing it but the strtotime function returns 0 (and therefore this example has an age of 2015) .. it is probably something fundamental but is my call function my_age_function ( $birthdate ) correct ?- if have a tag on the post eg 1998-03-26 ?function my_age_function( $birthdate ) { // Explode the date into meaningful variables list($year, $month, $day) = explode( "-", strtotime('$birthdate')); // Find the differences $y_diff = date( "Y" ) - $year; $m_diff = date( "m" ) - $month; $d_diff = date( "d" ) - $day; // If the day has not occured this year if ( $d_diff < 0 || $m_diff < 0 ) $y_diff --; return $y_diff; } add_filter( 'wp_tiles_byline_tags', function( $y_diff, $post ) { $y_diff['age'] = my_age_function( $post ); return $y_diff; }, 10, 2 );Forum: Plugins
In reply to: [WP Tiles] using post Tag as variable in functionMike
I am getting a bit confused here – until the wp_query is run in my_custom_content.php the sytem won’t know which posts satisfy the ‘having a birthday today’ criteria. When a post does satisfy that criteria I need to get the actual birthdate (which I will store either have as a post tag or a custom field whichever is the easiest) and set that as an $opts and pass it through to the_wp_tiles for displaying the age on each tile.
My problem is not in the displaying of the age as such (I have done that with a fixed date) but in the retrieving and passing a variable (of the birthdate )at the time of running the wp_query into the function to calculate the age.
I have tried passing a variable into the function in the format YYYY-MM-DD’ but that fails and produces an age calculated based on 1970.Forum: Plugins
In reply to: [WP Tiles] calculationPartially solved – I set up a get_age function and added a filter for ‘age’ the and put the template tag for age into the call to the_wp_tiles byline_template=> “%title% age,
As this is only used within the site in one place where I want the age to appear that is fine.
I am still having a problem though passing a tag as a variable to the function and will start a new thread for that.Forum: Plugins
In reply to: [WP Tiles] put calculated value in bylineMike
Firstly I would like to thank you for all the time you spend answering queations and supporting people like me! I do still need a bit more help though please.I have set up the query to select those posts where the meta key birthday value is current day and call the-wp-tiles to display a grid of those with a birthday today. (code in my customised content.php is here).
`<?php $query = new WP_Query( array(
‘meta_key’ => ‘birthday’,
‘meta_value’ => date( ‘F d’ )
));
$opts = array(
‘byline_template’ => “%title%”,
‘byline_template_textonly’ => false,
‘byline_opacity’ => ‘0.6’,
‘byline_color’ => ‘#000000’,
‘byline_height’ => 30,
‘byline_height_auto’ => false,
‘text_color’ => false,
‘image_text_color’ => ‘#FFFF99’,
‘ image_size’ => ‘original’,
‘post_type’=>’post’,
‘orderby’=>’title’,
‘order’=>’ASC’,
‘posts_per_page’=>’auto’,
‘ pagination’ => none,
‘category’=>’join’,
‘extra_classes’=> array(my-custom-styled-tiles),
‘post_status’=>’publish’); ?>
<?php the_content(); ?>
</div><!– .entry-content –>
<?php the_wp_tiles( $query, $opts); ?>
<?php wp_reset_postdata(); ?>`On this particular page where I use the-wp-tiles query I am only selecting those whose birthday it is and would like to say on these bylines how old they are (or even just in a caption to go under the tile??). I don’t want it on any other page that the same tiles appear in various groupings but will just print the age variable on the text on some posts.
I store the birthdate as a post tag in the format ‘d-m-Y’ (eg 22-03-1996). I have tried to create a function in functions.php to calculate the age in years for example but seem to have problems getting it to read the tag ‘birthdate’ from the post as a variable:function get_age( $birthdate ) { list($day, $month, $year) = explode( "-", $birthdate); // Find the differences $y_diff = date( "Y" ) - $year; $m_diff = date( "m" ) - $month; $d_diff = date( "d" ) - $day; // check if another year has been reached if ( $d_diff < 0 || $m_diff < 0 ) $y_diff --; return $y_diff;So firstly this function code to calculate the age isn’t working (something wrong with my code) it won’t seem to pick up my tag field variable $birthdate.
Secondly when I manage to get this bit of coding correct I need to pass this info to the-wp-tiles query so that for each post it returns (whose birthday it is today) it also returns the age and puts it onto the byline or as a tile caption.Would appreciate any help you can offer.
Forum: Plugins
In reply to: [WP Tiles] wp-tiles can't find image for one tileSorted this one. I had to attach the image to the parent post in the hierarchy but delete it from displaying within the post – only via the wp-tiles call. I had done this with the other post hierarchies but maybe by accident. Anyway seems ok now.
Forum: Plugins
In reply to: [WP Tiles] wp-tiles can't find image for one tileI have renamed the post deleted all again and even tried removing another tile from the group and also ordered them all differently to see if it was the position, and added the image as a featured image to see if that worked but nothing it still appears as a tile without image.
Forum: Plugins
In reply to: [WP Tiles] the_wp_tiles $optsMike
How would I incorporate the_wp_tiles( $query) call into a loop to output a default message if no tiles/posts were found after this call?