How to set Service Category?


#1

I installed Sydney in WP 4.4.2 and I can’t figure out how set Categories for Services. I imported the Sydney settings and data, and my site looks close to the demo, but I want to edit or add new Services. From what I understand they should be either Type A or Type B and I see those in Posts>Categories, but there is no way to add a category to Services, Employees, etc. I was searching for info here and also saw some posts about editing the Sydney Widgets, but I can’t figure out how to do that either.

Thanks.


#2

Hi,

You can set the category for the service in here http://prntscr.com/a4rlul
Then to display the service depends on a category, you can manage it from: edit page > edit widget > http://prntscr.com/a4rm7m


#3

Thanks for your response. Your picture shows Categories in the Services menu, but I don’t have that option. I only have All Items and Add New. http://i.imgur.com/KVAN2uD.png

If I edit one of the imported services such as Photography or Global coverage there is also no option to select a category. http://i.imgur.com/H3tTRPH.png


#4

I fumbled around a bit today and figured it out. I had to go to Types>Taxonomies and select Services under “Post Types to be used with this Taxonomy”.


#5

I’m starting to figure this out and would like to use featured images for each service instead of the icons like this: http://i.imgur.com/cjqr5UP.png

I would also like to use the “Service link” to link each service to a page of my choice. I tried this and it adds a link to the service title, but not the featured image. Is there a way to make the image clickable as well? I think it’s more intuitive to click on the picture.

Thanks.


#6

Great! you can manage the category issue :slight_smile:

To add a link to the featured image, you need to modifying the PHP code, and its better if you are working using child theme. Let me know if you want to continue working on this.

Regards,
Awan


#7

I would like to make the featured images clickable, so if you can help, or at least point me in the right direction, I’d really appreciate it.

Thanks!


#8

Okay, here is the steps:

  1. create a child theme
  2. duplicate “widgets/fp-services-type-a.php” from parent theme to the child theme
  3. open fp-services-type-a.php in your child theme
  4. change this line:
    <?php the_post_thumbnail('sydney-service-thumb'); ?>

to:

<?php if ($link) : ?>
   <a href="<?php echo esc_url($link); ?>"><?php the_post_thumbnail('sydney-service-thumb'); ?> </a>
<?php else : ?>
   <?php the_post_thumbnail('sydney-service-thumb'); ?> 
<?php endif; ?>
  1. Activate your child theme
  2. open functions.php in your child theme and add this line:
if ( function_exists('siteorigin_panels_activate') ) {
  require_once get_template_directory() . "-child/widgets/fp-services-type-a.php";
}
  1. open functions.php in your parent theme and change this line:
    require get_template_directory() . "/widgets/fp-services-type-a.php";
    to:
    // require get_template_directory() . "/widgets/fp-services-type-a.php";

Please make sure you edit the file from the FTP not from wp editor. That’s it. Let me know how it goes :slight_smile:

Regards,
Awan


#9

Works perfectly! Thank you very much for your help!


#10

Opps, maybe I spoke too soon. The featured image link works, but I just noticed a big white space at the top of the home page when the second image loads in the slider http://i.imgur.com/eVCqxYP.png

Maybe I did something wrong with the child theme.

Here’s my site if you want to have a look: http://www.arossphoto.com/wordpress/

Thanks again.


#11

I’ve tried the child theme in a couple browsers and the problem with the white bar was persistent. Here’s how to reproduce it:

Load the homepage (http://www.arossphoto.com/wordpress/), scroll down to Services, click on the picture or “Photography” to load the sample page, use the browser’s back button to go back the homepage, scroll up to top of page. When the second slider image loads there is a white bar across the top of the page.

The second image disappears completely if you scroll all the way down to LATEST NEWS, click on one of the links, use the browser back button, then go back to the top of the page. Strange.

Thanks again for your help with this.


#12

I just read in another thread that the white space problem is an issue with the parent theme. It was just a coincidence that I noticed it after creating the child theme.

I applied the fix suggested in that thread it looks good now.

Awan, since I edited functions.php in the parent theme will I have any problems when it comes time to upgrade? I tried changing back to the parent theme when I was having the white space problems, but I got a fatal error and couldn’t get back into the wp admin without editing the functions file. So this seems like a permanent change.

Thanks


#13

Hi,

It’s great that you’ve found the answer from another thread.

“since I edited functions.php in the parent theme will I have any problems when it comes time to upgrade?”
> Yes, all your modified files would be replaced when you upgrade the theme and you have to modifies the file in the parent theme again manually.

“I tried changing back to the parent theme when I was having the white space problems, but I got a fatal error and couldn’t get back into the wp admin without editing the functions file”
> When you edit a PHP code, you have edit it from FTP, not from wp editor. Then what you have to do to fix the error is:

  • open functions.php in your parent theme and change this line:
    // require get_template_directory() . "/widgets/fp-services-type-a.php";
    to:
    require get_template_directory() . "/widgets/fp-services-type-a.php";

Regards,
Awan


#14

How to modifying the PHP code?

http://imgur.com/x1vU9qI


#15

“How to modifying the PHP code?” If you’re not seeing categories for clients, look for Types in the left menu in Wordpress. Select Types>Taxonomies and select Clients under “Post Types to be used with this Taxonomy”.