tarfis
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: print taxonomy id on taxonomy.phpthanks a lot for posting this. works like a charm and does just what i need it to do! (put out the term id via taxonomy.php)
by the way, until the developer includes my “patch” you can also use
<?php global $ec3; $ec3->nocss=true; ?>
in the<head></head>
section in your wordpress template files.just insert the line right before the one saying
<?php wp_head() // For plugins ?>
this will prevent wordpress from loading the ec3-css. if you want to customize the style anyway to make it fit better in your page layout and design, this might be the best solution anyway.
this will also make the “popups” disappear. e. g. you can copy and customize the original ec3-css into your style.css-file.
hope this tip also helps!
ok, sorry if my explaination was somewhat obscure.
category-[ec3-cat-id].php
andcategory-#.php
are two ways to try to explain the same thing. i’m trying again, now step by step, hopefully to make things clear.### 1 PREPARATION:
1.1 YOUR CURRENT THEME
first of all, find out what theme you are using. log in to wordpress with your admin account and go to Appearance > Themes and look up the path information of your current theme:
All of this theme’s files are located in /themes/{YOUR_CURRENT_THEME}
(screenshot: https://codex.www.ads-software.com/Appearance_Themes_SubPanel )
Take down a note of this information on a piece of paper, we will need it later on.1.2 THE EVENT CATEGORY
now, let’s find out the ‘id’ of your event category:
still in wordpress, go to posts > categories. click your events category (or click ‘edit’ just below).
now, we need to take a look at our web browser’s address bar. the address will look something like this:
https://{YOUR.DOMAIN.ABC}/wp-admin/edit-tags.php?action=edit&taxonomy=category&post_type=post&tag_ID={SOME_NUMBER}
take down the number you see in place of where I put ‘{SOME_NUMBER}’.
EXAMPLE: if the last part of the address shown in the bar say something like &tag_ID=12, the number we are looking for would be 12. this number is the so-called ‘category-id’.
take this information also down on your piece of paper.
you may log out of wordpress now. be careful not to make any unwanted changes to your events category through the process of finding out its category-id.### 2 ADDING A THEME FILE FOR YOUR EVENTS CATEGORY
2.1 GET THE THEMES’ CATEGORY.PHP-FILE
so now, we go to the folder of your current theme. if you don’t have wordpress installed locally on your computer, this means you will have to do that via FTP.
log in to your webspace via FTP and go towp-content/themes/{YOUR_CURRENT_THEME}
sometimes there is no folder called “wp-content”. (that being the case if your installation is hosted on a server where more than one wordpress-blogs are hosted.) if that’s the case, just look forthemes/{YOUR_CURRENT_THEME}
now, take a look at the files stored in that folder. there are some .php-files, at least one .css file, maybe a file called “screenshot.png” and so on.
nevermind, the only file we are looking for is the file “category.php”. download it to your desktop and keep the original copy on the server (do not delete it from the server – your wordpress theme will still use it for the other categories!). stay logged in with your ftp-account.2.2 CUSTOMIZE THE THEME FOR YOUR EVENTS CATEGORY
take a look at your piece of paper and look up the previously noted category-id-number.
rename the downloaded category.php-file tocategory-{CATEGORY-ID}.php
.
CONTINUED EXAMPLE: if the category-id was 12, the file would be renamed tocategory-12.php
.
now open the renamed file in an text-editor and search for the stringthe_excerpt
and replace it withthe_content
.
save the changes to the file.
upload the newly madecategory-{CATEGORY-ID}.php
file to the very same folder we downloadedcategory.php
from.
before you log out from your ftp make sure there are now bot .php-files in your theme’s folder ??### 3 TEST
reload your website. is the events-category now shown differently than before? are the other categories still looking the way they did before? if that’s correct, we did a good job.
i’m quoting myself from the above posting for an explaination:In short: WordPress looks for a template-file of the specific category-id (which i called category-[ec3-cat-id].php) before it falls back to looking for the general category-template file (the category.php-file). See also the visual overview at https://codex.www.ads-software.com/Template_Hierarchy
have fun!
cheers,
tarfisps. for further information on template hierarchy and on the_excerpt/the_content just perform a search on the online wordpress documentation which can be really helpful!
Hi, rwilki,
I experienced the same situation and that’s the way I solved it:
– find out the id of my Event-Calendar-category
– go to my templates’ files
– create a file called category-[id].php (instead of ‘[ec3-cat-id]’ I put the previously obtained number in it)
– open category.php
– open category-[ec3-cat-id].php
– copy and paste the code from category.php to category-[ec3-cat-id].php
– close category.php
– in category-[ec3-cat-id].php search for “the_excerpt” and replace it with “the_content”
– save the changes to category-[ec3-cat-id].php and voilà!In short: WordPress looks for a template-file of the specific category-id (which i called category-[ec3-cat-id].php) before it falls back to looking for the general category-template file (the category.php-file). See also the visual overview at https://codex.www.ads-software.com/Template_Hierarchy
Put both .php files in your template folder and everything will work out just fine ??
To get rid of EC3’s dates-list in the excerpt view there’s an article elsewhere:
https://www.ads-software.com/support/topic/plugin-event-calendar-3-event-calandar-314-breaks-wordpress-filters?replies=2