Shape 5

Wordpress Free Themes => Vertex - Free => : bugra47 March 04, 2018, 07:38:55 AM



: How can make excerpt work on main page content.
: bugra47 March 04, 2018, 07:38:55 AM
I made   The Content Area Shown On The Frontpage,   but front page showing whole content of the post.  I want to show  only few lines of first paragraph ot it ( excerpt),  I could not excrpt work on it,  most of the excetp plugins  not working.
how can we make excerpt available on front page?
(I tried to install site shaper but I couldn't.  So, I want to customize the them by myself )
domain:  ilhamtohti


: Re: How can make excerpt work on main page content.
: Tristan Rineer March 05, 2018, 02:02:53 PM
Have you made sure that you have the latest version of the Vertex Upgrade Patch (http://www.shape5.com/component/option,com_docman/Itemid,96/task,cat_view/gid,308/) installed? 

I've attached the latest version of the content.php file that is used in all the latest releases, it may already have the changes you need.  You can just extract the file from the .zip, and overwrite the existing file in the theme folder.


: Re: How can make excerpt work on main page content.
: bugra47 March 06, 2018, 09:18:29 AM
hi,   thank you for reply.
I installed latest patch after I installed the theme fle a week ago.  I just downloaded from the link you provided above, and  installed again ...

I installed the patch in the way as you instructed in another discussion ( steps like below):

   1. Download the Vertex Upgrade Patch.
   2. Back up your site (just in case).
   3. Copy the vertex/footer.php from the theme folder to somewhere safe (you'll be putting it back after patching).
  4. Delete the vertex folder from the theme (nothing else, that is the only thing to delete).
  5. Extract the zip file containing the patch, and upload it to the theme folder through FTP, choosing "overwrite" if/when prompted.
  6. Copy the footer.php file (from step 3) back into the vertex folder of the theme.


It is installed successfully,  but nothing changed,  homepage still showing whole article content. 

I set up  from admin panel :    Setting --> reading  ,      Your homepage displays  : Your latest posts
                                                                                               For each article in a feed, show  :  summary

  I have been troubled to  fix this issue and tried many way,  but  they don't  work. I don't know where is the problem


: Re: How can make excerpt work on main page content.
: Tristan Rineer March 06, 2018, 01:21:58 PM
Did you install the updated content.php file I attached to my previous post?


: Re: How can make excerpt work on main page content.
: bugra47 March 06, 2018, 01:53:02 PM
actually I did not quite understand that;
Do you mean this?
'"easiest way to fix it is to delete the "Sample Data Injector" plugin, then re-install it by extracting the "/wp-content/plugins/shaper_{theme_name}.php" file from the shaper, putting it into a .zip file, and using the WP plugin installer to re-install it from that new file. ..." 
I could not find "Sample Data Injector" plugin, 
can you explain with step by step?  I am so sorry to take your time,   


: Re: How can make excerpt work on main page content.
: Tristan Rineer March 06, 2018, 02:15:24 PM
The "Sample Data Injector" plugin is located in the Shaper .zip file, in the wp-content/plugins folder, with the "shaper-{theme}.php" name.


However, what I am asking is if you tried installing the replacement content.php file I attached to an earlier post, as seen in the attached screenshot. 


: Re: How can make excerpt work on main page content.
: bugra47 March 06, 2018, 02:49:54 PM
yes,  I just replaced content.php file that you attached,
but it seems like not changed.. still same


: Re: How can make excerpt work on main page content.
: Tristan Rineer March 07, 2018, 09:28:27 AM
I found this solution with a quick search on the forum:

To change posts to use the excerpt on any non-single pages:

Edit the content.php file in the theme folder and look for the following line (near line 55):

:
		<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

Change it to:

:
		<?php if ( is_archive() || is_search() || !is_singular() ) : // Display excerpts for archive, search, and any area that is not a single post or page. ?>


I believe that should do what you need.


: Re: How can make excerpt work on main page content.
: bugra47 March 07, 2018, 02:49:02 PM
I found this solution with a quick search on the forum:

To change posts to use the excerpt on any non-single pages:

Edit the content.php file in the theme folder and look for the following line (near line 55):

:
		<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

Change it to:

:
		<?php if ( is_archive() || is_search() || !is_singular() ) : // Display excerpts for archive, search, and any area that is not a single post or page. ?>


I believe that should do what you need.




thank you so much for your help,  it does work.   Really appreciate for your patience.


: Re: How can make excerpt work on main page content.
: bugra47 March 12, 2018, 07:40:57 PM
Hi,   thank you for your help on my above question.  The solution you gave me works fine,   but I don't know when it comes to another domain, ..../cn, which is in Chinese language,   excerption not working again... front page still showing whole content.
I did replaced content.php file, installed patch file, and added the php code you gave me above , but its still not workking,  main page showing whole content..

another problem is  paragraphs disappeared on the front page.
When I open a post ,  I can see paragraphs seperated on a single post page, ( there are paragraph marks <p>  on post edit text area).  But front page showing all paragraphs joined.
I could not find hout the problem,,   can you help me check it again?


: Re: How can make excerpt work on main page content.
: Tristan Rineer March 13, 2018, 11:24:41 AM
The home page is displaying excerpts, but it looks like WP doesn't understand where to split the content.  You may need to enter a custom excerpt in the page/post editor to make sure that it splits things correctly.


: Re: How can make excerpt work on main page content.
: bugra47 March 13, 2018, 12:26:13 PM
The home page is displaying excerpts, but it looks like WP doesn't understand where to split the content.  You may need to enter a custom excerpt in the page/post editor to make sure that it splits things correctly.

ok,  it looks lie works.
But I don't understand why single post page shoing paragraphs seperately, but front page dosn't .   
I don't thin it is normal ...


: Re: How can make excerpt work on main page content.
: Tristan Rineer March 13, 2018, 12:35:11 PM
That's normal.  The WordPress excerpt does not generate paragraph breaks; you may be able to add the code in the excerpt editor manually, but WordPress might automatically remove the HTML.  There might be some excerpt plugins available to improve the way the excerpt works, but I haven't used them.


: Re: How can make excerpt work on main page content.
: bugra47 March 16, 2018, 02:15:14 PM
ok,  thank you