demetris (Demetris Kikizas)
Forum Replies Created
-
Yep. That’s a concern I share myself. ??
I was just wondering if people have found any non annoying ways of implementing this.
I will forget about it for now and maybe revisit it after the project goes live.
Thanks for the super quick reply,
Demetris
Forum: Plugins
In reply to: [WooCommerce] WooCommerce Analytics: How to filter out orders with zero valueThanks for the reply, xue28!
And thanks for the link too. It is indeed a good for me to start exploring what can be done about zero-value orders.
Cheers,
Demetris
Forum: Plugins
In reply to: [Nelio AB Testing] Dependency on regenerator-runtimeOh, that’s great!
Thank you very much for your help, David!
Demetris
Forum: Themes and Templates
In reply to: Adding other files to a child theme?dcloud,
You need to help others help you. You can do this by doing some work yourself first: just read the documentation carefully.
The concept and the workings of child themes are simple, and the documentation is plentiful and of good quality. So, take some time to look at it again, and you will see that you will understand better and that others will be then able to help you more efficiently.
Forum: Themes and Templates
In reply to: Adding other files to a child theme?Sorry. Did not see your last post.
For index.php: An index.php in a child theme’s folder overrides automatically, just by existing, the parent’s index.php. The same goes for ALL template files. So, you can make something completely different from what the the parent offers, or you can take the parent’s template file and just modify a bit or two in it.
For functions.php: You can have a functions.php in your child theme containing just the extra bits you want to add. WordPress loads both functions.php files. First the child’s, then the parent’s.
Forum: Themes and Templates
In reply to: Adding other files to a child theme?dcloud, it depends on what you want to do.
If you want to use some JavaScript files, for example, you enqueue them from your functions.php using the WordPress Script API.
If you want to use some extra PHP files for which WP does not offer a standard way, you use the appropriate PHP constructs:
include
,require
,include_once
,require_once
.If you want to use images for your styling, you can link them from your style.css.
You can go a long way by using just your main CSS file and images linked from it. For the other parts, you can start by reading on:
First, WordPress templates.
Second, the WordPress Plugin API. (Which is not just for plugins, but for every piece of code that wants to extend or modify WordPress.)
Forum: Themes and Templates
In reply to: Child Theme Not WorkingAs I said in the comments at op111.net — https://op111.net/53/ — it seems there is a bug with theme names that have only numbers:
https://core.trac.www.ads-software.com/ticket/15306
Cheers!
Forum: Alpha/Beta/RC
In reply to: Static home page not showing 3.1Thanks for the answer. I asked because the names of your homepage templates seemed uncommon to me.
Regarding the conditional functions is_home(), is_front_page() etc.:
They should work. If they don’t, it’s a bug. Do you by any chance use them directly, like this?
if (is_home()) { # Do something. }
In that case they are not supposed to work, because the WordPress query object is not yet set up at the time WordPress loads the theme files.
There was an instructive thread about this some time ago at wp-testers:
https://groups.google.com/group/wp-testers/t/3b311314110fe59d/7512d265de4f15c5
Forum: Alpha/Beta/RC
In reply to: Static home page not showing 3.1Forum: Alpha/Beta/RC
In reply to: 3.1 beta 2 freezes when i'm writing in greekCould be a number of things, but I cannot reproduce. Tested with:
- Latest WP trunk (which is newer that 3.1 Beta 2)
- Firefox 3.6
- Firefox 4 latest nightly (20 December 2010)
Forum: Alpha/Beta/RC
In reply to: Function for neighbouring posts, broken by 3.1-beta1Aha! That explains it. Thanks for pointing the ticket out.
The broken functionality is documented functionality, so, I suppose, a fix will be provided sooner than later.
Cheers!
Forum: Alpha/Beta/RC
In reply to: Function for neighbouring posts, broken by 3.1-beta1Just a quick observation:
If I wanted to get the next/previous posts, I would try with built-in WP functions first. I would start with something like:
$prev_in_cat = get_previous_post(true); $next_in_cat = get_next_post(true);
Now I have the two adjacents posts in the same category, and can go on to do what I want with them. Say:
if ($prev_in_cat) echo $prev_in_cat->ID . '<br />'; if ($next_in_cat) echo $next_in_cat->ID . '<br />';
get_previous_post() and get_next_post() have been in WP for quite a long time, they are documented both inline and in the Codex, and I can use them without worrying about compatibility.
In general, when I don’t know if WP offers built-in functionality for something I want, I go, say, to:
https://phpdoc.www.ads-software.com/trunk/
… and search if a function or API exists already; function and class names are self-explanatory in most cases.
Forum: Alpha/Beta/RC
In reply to: is_post_type() within the loop?Ouch. Apologies for the misinformation. Andrew Nacin is correct.
So, the correct example would be:
if (get_post_type() == 'photogallery') { # Do some stuff. } else { # Do some other stuff. }
Forum: Alpha/Beta/RC
In reply to: Accidental upgrade to wp 3.1betaSee also the Codex, which has a detailed article on updating with a section on manually updating:
Forum: Alpha/Beta/RC
In reply to: Accidental upgrade to wp 3.1betaTo start with your second question:
WordPress shouldn’t be offering updates to beta versions unless you use a plugin specifically for that, like WordPress Beta Tester:
https://www.ads-software.com/extend/plugins/wordpress-beta-tester/
Do you have any plugin like that installed?
Now to your first question:
You can downgrade to 3.0 and most likely everything will work fine, but you have to do it manually and very carefully:
First, delete the wp-admin and wp-includes directories.
Then delete all WordPress files from your root directory. Be carefull, of course, not to delete files that are specific to your installation like wp-config.php and .htaccess.
Then upload via FTP the 3.0 files.