Polylang and template files

One option is to create a single category.php file with conditionals. So, you would have something like this: <?php if(is_category(‘one’) || is_category(‘un’) { // your code here } elseif(is_category(‘two’) || is_category(‘deux’) { // your code here } ?> This way you can still output different code per category, but you won’t have to copy category-one.php … Read more

HELP: cannot log into wordpress. PHP error

When you get that polite ‘white screen of death’, you’ll find the problem in the error.log file in the root of your site (perhaps in the error.log file in wp-admin, if the error was caused by an admin-level program). You can renamed the plugins folder to temporarily disable all plugins. But the error.log file will … Read more

Possible to edit custom date field and display?

Editing the theme is a good way to get this done, if it’s a theme with updates from someone else I would make a child theme to prevent your changes being overwritten: https://developer.wordpress.org/themes/advanced-topics/child-themes/ Another option is to make a plugin that utilizes a shortcode that allows any WordPress editor to just plug that shortcode into … Read more

Delete empty title_tags, find a h1 heading and echo it

You can’t do if(the_title()) cuz the_title() this code’ll echo a value… Use get_the_title() for a return of the value. Remove this code too: $newtitle = h1 -> outercontent; Do this for check if title is empty: if(empty(get_the_title())){ // Is empty } else { // is not empty } Or you can do only this: if(!empty(get_the_title())){ … Read more