I need to change Referenznr.: order_12345 to an invoice number from another plugin. Here is the code to get it:
// Getting invoice number
$invoice = wcpdf_get_invoice( (array) $order->get_id(), true );
$invoice_number = $invoice->get_number();
$plain_invoice_number = $invoice_number->get_plain();
How can I edit the label template to change it and still keep the plugin updates?
]]>Questions:
– If I don’t need to create any configuration for any blocks, do I need to add markup code?
– In my example below, if I don’t need my client to configure anything relating to the footer, then do I need “wp:group” for any reason?
– Why do I want to include markup such as wp:group?
My footer:<!-- wp:group {
"align":"wide",
"layout":{
"type":"flex",
"orientation":"vertical",
"justifyContent":"center"
}
} -->
<div class="wp-block-group">
<!-- wp:site-title {"level":0} /-->
<!-- wp:paragraph -->
<p>Copyright</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
home.php
<div class="test-class">
test text
</div>
functions.php
<?php
function blabla() {
wp_enqueue_style( 'homepage', './homepage.css' );
}
add_action( 'wp_enqueue_scripts', 'blabla' );
?>
homepage.css
#test-class {
color: red;
}
All the files are in the root folder of the theme.
I don’t understand why the css is not enqueued. (The text in the div has no red color).
]]>Custom color background doesn’t work and if I disable the theme styles for the table it also strips other themed elements that I have like purchase buttons and other active elements that I put in there using shortcodes.
I use the Elementor page builder and the styling is made from there.
Isn’t there a way to make the style of the table important without disabling the theme styling for the table?
]]>dk-speakout-progress-wrap
.
Should we add a theme that fits more to the style of twentytwenty-one? I can propose one, but i don’t understand how to contribute code on this plattform.
Best
]]>I’m trying to customize the autocomplete dropdown by modifying the autocomplete.php template as specified in the Customization section of the Customize the Autocomplete dropdown documentation.
The problem is that I am not using the WordPress theming system. I am using the Oxygen builder, which disables it completely. Thus I do not have an active theme and cannot add the templates folder to an active theme.
I use a custom plugin (WP_PLUGIN_DIR.'/custom-functions/'
) for code that I’d typically put in a theme’s functions.php. I would like to load the templates from the plugin instead of from a theme. The templates are within the algolia folder within my custom plugin (WP_PLUGIN_DIR.'/custom-functions/algolia/'
).
I (incorrectly) attempt to load these templates using the following code:
// Load custom algolia templates
function algolia_page_templates($template)
{
if ('instantsearch.php' == basename($template)) {
$template = WP_PLUGIN_DIR . '/custom-functions/algolia/instantsearch.php';
} else if ('autocomplete.php' == basename($template)) {
$template = WP_PLUGIN_DIR . '/custom-functions/algolia/autocomplete.php';
}
return $template;
}
add_filter('page_template', 'algolia_page_templates');
But this does not result in the loading of my customized templates; there is no noticeable change.
I used these template names because that’s what they are named in the class-algolia-template-loader.php file within this WP Search with Alolia plugin.
Please let me know what I can do to load my custom templates from a plugin instead of through a theme.
Thank you
]]>I’ve found that there is an issue for the single course pages as well due to blocks beeing used. Is there a simmilar issue for the course archive page perhaps?
]]>let styleOptions = [
{ label: __( 'Primary', 'wp-bootstrap-blocks' ), value: 'primary' },
{
label: __( 'Secondary', 'wp-bootstrap-blocks' ),
value: 'secondary'
},
{ label: __( 'Info', 'wp-bootstrap-blocks' ), value: 'info' },
];
styleOptions = applyFilters(
'wpBootstrapBlocks.button.styleOptions',
styleOptions
);
Nothing appeared in the editor.
Then I realised that these options are actually built in the plugin and are retrieved via the build\index.js that has specified only the Primary and Secondary colours.
Then I visited the forum here and came about a related discussion about the background colours of the columns here:
https://www.ads-software.com/support/topic/adding-new-colors-to-column-block-settings/
https://www.ads-software.com/support/topic/bg-colors-dont-show-in-editor-mode/
So if this advice is to be followed for each and every block we are using we have to do these overrides.
I think that the best way to do this is to refactor the application so that the colour options are specified ONCE and reused by all the blocks that have colour options.
I mean in bootstrap we have these set number of options:
// Theme colors
$theme-colors: (
"white": $white, // custom color type
"light": $light,
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"dark": $dark
) !default;
Also we have a number of statuses for the controls
e.g. (default) active, light, inverse
Is it please possible to consider in the next version to create a common library for the colours that will have all these colours and status options?
I am sure that this will sort out the related support issues.
]]>