Building WP theme with Download Manager support

in Download Manager Free

Viewing 5 posts - 1 through 5 (of 5 total)
Jan 21, 2016 at 12:29 am
#39264
Member
correa
OP

Hi,

I have a website that has products like computer boards. They have Manuals, Drivers for Windows, DOS, Linux, etc. What I want is that sidebar.php would display a Manuals button when there are manuals for that product, as well as Drivers button when there are drivers available.

Therefore I need to be able to generate from php code a link to a page that would list Drivers and another one for Manuals. So far I have used a custom property to hold the file ID to feed into wpm_get_package.

That works for some instances of Manuals when I have only one file (there might be more than one kind of Manual per product). But obviously doesn’t work as I expected for drivers. I thought I could somehow get a category ID and display a category instead, but categories seem to only render the text from the file packages it contains, no links to them.

How would you suggest that I implement that?

Jan 21, 2016 at 7:40 am
#39271
Keymaster
Shahjada
Staff

May you please give me an url example or image mockup how you want to implement it, then I can suggest you clearly šŸ™‚

Jan 21, 2016 at 11:22 am
#39288
Member
correa
OP

Sure, this page is currently implemented in something else, I’m trying to reproduce it in WP:

http://www.comm5.com.br/novo/produtos-categoria/placas-seriais-pci-express-33/2sg-pci-e-153

On the right there is a sidebar with 3 link images, one for Catalogs (Catalogo), Manuals (Manuais) and Drivers. Each can either be a single download file (pdf or zip) or have “suboptions” such as “Windows”, “Linux”, etc. So, clicking one of them I would like to get something similar (or better) that this:

http://www.comm5.com.br/novo/departamentos/drivers/153

My current implementation of sidebar.php for WP contains this to get the link:

function comm5_get_download_link($property) {
		// Query custom property value
		$propertyValue = get_post_custom_values($property);
		$wpdm_package = wpdm_get_package(intval($propertyValue[0]));
		if ( count($wpdm_package) > 0 ) {
			return esc_url( $wpdm_package['page_url'] );
		} else if ( count($propertyValue) > 0 ) {
			return esc_url( get_permalink( get_page_by_path( $propertyValue[0] ) ) );
		} else {
			return '';
		}
	}
Jan 22, 2016 at 6:21 pm
#39380
Member
correa
OP

Any ideas?

Jan 27, 2016 at 7:33 am
#39657
Keymaster
Shahjada
Staff
  1. You need to crate in categories forĀ Catalogs (Catalogo), Manuals (Manuais) and DriversĀ 
  2. Again create 3Ā pagesĀ forĀ Catalogs (Catalogo), Manuals (Manuais) and DriversĀ 
  3. Now add category short-code in corresponding pages, like Catalogs category short-code in Catalogs page
  4. Now in your sidebar, use those 3 page urls with your image
  5. Now upload your files and select proper category.
Viewing 5 posts - 1 through 5 (of 5 total)

The topic "Building WP theme with Download Manager support" is closed to new replies.