Post Type Services / using seperated field excerpt

Hi,

on the edit-page ‘Services’ is an separate field ‘Excerpts’.

When I use this field the excerpts should be taken/prepared from this field and not from the main text. (That’s the logic behind it as I understand it.)

But in the theme the excerpts are always taken from the maintext and not from the special field.

This (unexpected) behaviour is the same for:

  • Overview Page Services (archive-services.php)
  • Sydney service widget Type A
  • Sydney service widget Type B

How do I prepare the theme/wordpress(?) to take the excerpt from the extra provided field (if filled out) and not from the main text?

Thanks,

Kind regards
Wulf

Hi,

We probably should have disabled that field to not cause confusion.
Manual excerpts (the field you used) work only if the excerpt (manual or automatic) is set to show in the theme. But for the services, the full content is set to show so using that field would do nothing.

Hi Vlad,

on more thx for ure answer :slight_smile:

for the services, the full content is set to show so using that field would do nothing

Yes. I checked it myself in the meantime and indeed that’s a bug to the theme. The theme-author simply called the wrong wp-function. Correct is ‘the_excerpt()’. This function manage wp-automatic. He uses ‘the_content()’.

Question:

Is here a way to report bugs to the developers?
Or better: could you please report this issue to the developers.

Additional issue:

According to this there is ANOTHER issue to the options logic. It concerns the optional service-link which is prepared on the edit-services-page:

The Widgets and archive pages should use the link to the service-page if the editor does not set a separate service-link on the edit-page.

But the theme NEVER sets a link to the service page direkt. Not in the archive page nor in the widgets. So: you show up services on the archive page and in the widget, but you don’t link to the services direkt. (In WP you don’t need to set the link in a separate field, WP knews the link itself … you only use such fields if you whant give the editor a chance to set a link different from the standard link.)

In the actual manner the services section of the theme is not very useful or has only very restricted use :wink:

Kind regards
Wulf

Hi Vlad,
@all who are interessted in a solution,

Concerning the reported issues I did some changes to the code so it works to my project:

  • use of manual excerpt
  • automatic direct links to single service pages

Here are the changes to the community:

Archive Services
---------------------------

File: archive-sercices.php
Line; 33
Replace: ‘the_content()’ with ‘the excerpt’

Widget SideOrigin PageBuilder
I only had a look to Services Type B
-------------------------------------------

Change Behaviour so it ALWAYS takes service icon and link to service-page

File: widgets/fp-services-type-b.php

Delete Line: 136
<?php $link = get_post_meta( get_the_ID(), ‘wpcf-service-link’, true ); ?>)

Rplace Lines 139 - 160
= content of div container 'list-item’
with:

<a href="<?php echo the_permalink() ?>">
	<div class="icon">
		<?php echo '<i class="fa ' . esc_html($icon) . '"></i>'; ?>
	</div>
</a>

<div class="content">
	<h3>
		<a href="<?php echo the_permalink() ?>"><?php the_title(); ?></a>
	</h3>
	<?php the_excerpt(); ?>
</div><!--.content-->

Cutom Metabox for post type services (= admin-page ‘edit services’)
-----------------------------------------------------------------------

Remove the (for THIS case) useless field with optional additional link

File: wp-plugin-directory/sydney-toolbox/inc/metaboxes/services-metabox.php

Remove lines for custom field service_link:
Line 66
Line 69
Line 75
Lines 80-83


This is only a qucik summary without a grant. But if you have some experience with coding it should help you for a quicker solution.

Note: the changes are of course not official and not supported by the theme author here.

Do changes not in the original files as shown in the example. You will loose your changes with the next update. Do the changes in a child theme :wink:

Hi,

Nope, the whole purpose was to use the_content.

Services were always meant to display the full content of the post and only link to a page if the user wants to link. So it’s not that we couldn’t make the post title link automatically, we just wanted to give the user more freedom to chose his own link.

So as I said, the only issue here is that we’ve left that unfunctional Excerpt textarea there. But maybe we’ll add an option so that the user can choose to display either excerpt or full content.

Happy to see you’re able to make the changes you want on your own :slight_smile:

Hi Vlad,

let’s say it the nice way:
Sometimes … there are other coder out here … which are working acccross different frameworks :wink:

Nope, the whole purpose was to use the_content.

Well, - may be … but if this would your purpose the logic behind your solution fails on another point.

Vlad, it is not going to tell her how god your thinks are oder that they don’t have issues or such things. Frameworks like this have issues. In this case: I spent my time to help to make this very nice theme better … not to discuss :wink:

Or please answer my question:
What is the official way to report an issue here?

This part of the theme has indeed some (logical) issues and works in parts against WP standards. My kind ask is to report it to the developers. They will see what I mean. And if it will be updated in one of the next versions … it would be great. I for myself don’t need an update for this project because the project will be ready when an update comes … :wink:

Happy to see you’re engaged in support :wink:

Thx
Wulf

I am the developer and in almost two years since this theme existed nobody (as far as I am aware) didn’t complain about the use of the_content instead of the_excerpt or that the service titles don’t link automatically.

Services are custom content and we chose to display it a certain way - judging by more than 100k active installs for the free version and who knows how many for the paid one, I would say people like our solutions. I am not saying that it couldn’t be better or we can’t improve things. For example I’m improving things right now for the next update.

A good solution here would be to let the user chose what to display (content or excerpt). We can’t switch to the excerpt by default because that will mess it up for people who are counting on the full content being displayed. I have to consider every possible use case, not just a particular one :slight_smile:

Note that you don’t need to echo the_permalink().

Edit: if there’s any issue you’d like to report you can email me directly at vlad[at]athemes.com.

I’ve added an option to select either Content or Excerpt for the Services widgets.

HI Vlad,

then: nice to meet you. I am very pleased to meet the brain behind all the nice designs :slight_smile:

Yes, your designs are very nice. The success of installations show that a lot of people like the designs too … :slight_smile:

But:

who knows how many for the paid one

… if you don’t knew how many customers you have who else should knew it?
[humour off]

Yeah … things are never perfect … special not frameworks like this … and issues will be found even after two, three, four … years. In this case you named it yourself as an issue ‘unfunctional Excerpt textarea’ … great, that you fixed it.

Sharing noticed issues and personal solutions makes things better, even such solid frameworks like this … but every developer needs to decide on his own if and how he solve the task.

Jus some pennys to ‘the_excerpt()’:
In this special case it was my(!) personal(!) preference because it is a quick solution and it includes an automatic option switch without changing to much code. If the the excerpt-field is empty the function takes the content from the content-field … but in another actual projekt (other framework) I indeed prefered a hard switch to make it more clear for the customer …

And thx for the hint not to echo the_permalink() … indeed … the echos needs to be removed too … very late coding and fast coding … includes issues … for sure :wink:

Kind regards,

Wulf

PS: if you are interersted in some feedback (one personal view from one(!) user) you are welcome … Please contact me on my personal mail (please take it from the system because I don’t like to go public).

Yeah I meant I don’t know the number of active installs for Sydney Pro, not the number of customers. The theme is licensed GPL so it can be used on more sites.
And I haven’t designed it, I just coded the PHP part :slight_smile:

… so you understand what I mean with … very late coding and fast coding :wink:

Even as coding-developer behind it:
Nice to meet you once more :slight_smile: :slight_smile: :slight_smile:
.
.
.
.
.
.

I know about GPL Licensing … isn’t it the base to publish on the official Wordpress-Plattform? And it is standard for most market player … but even the pro Version with lizens key … complete without technique to register new installations … or evaluation of mulitple installations …?

You should know your market and the behaviours of your customers *g
And … I believe … you do :wink:

[ to make it clear: there is big part of kind humour in the air! ]

GPL is necessary for themes published on wordpress.org (and also their paid versions). It is not necessary in other places.

Well, the public design market is not an easy one.
And there are a lot of competitive frameworks …

Acutal: thank you for your help and the exciting discussion.

As my problem is resolved … I will set this thread to resolved too.

Kind regards,
Wulf