Event Calendar 3 for PHP 5.3
Is there a way to make Event Post show full text and not exce (5 posts)

  1. rwilki
    Posted 5 years ago #

    I love the plugin! It's probably the best event plugin I've worked with. But, it's so annoying that I can't figure out one glitch. When a date on my widget calendar is clicked, it takes me to a post page but the event content is in excerpt form. I really don't want to have to click twice to see the entire event description.


  2. tarfis
    Posted 5 years ago #

    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.wordpress.org/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:

  3. rwilki
    Posted 5 years ago #

    @tarfis, wow great suggestion. a few things I don't understand...
    where is the file category-[ec3-cat-id].php file you're talking about?
    am i supposed to have [2] new files? one called category-#.php and one called category-[ec3-cat-ed].php?

    Sorry for being thick, I just can't put the pieces together...


  4. tarfis
    Posted 5 years ago #

    ok, sorry if my explaination was somewhat obscure.

    category-[ec3-cat-id].php and category-#.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:
    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.wordpress.org/Appearance_Themes_SubPanel )
    Take down a note of this information on a piece of paper, we will need it later on.

    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:
    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.

    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 to wp-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 for themes/{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.

    take a look at your piece of paper and look up the previously noted category-id-number.
    rename the downloaded category.php-file to category-{CATEGORY-ID}.php.
    CONTINUED EXAMPLE: if the category-id was 12, the file would be renamed to category-12.php.
    now open the renamed file in an text-editor and search for the string the_excerpt and replace it with the_content.
    save the changes to the file.
    upload the newly made category-{CATEGORY-ID}.php file to the very same folder we downloaded category.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.wordpress.org/Template_Hierarchy

    have fun!

    ps. 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!

  5. ahunte1
    Posted 4 years ago #

    Thanks, tarifs. This worked for me, but my theme sets up categories a little bit differently, so I had to adjust.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic