Please i've added custom field to my portfolio posts, one of the field should be a pdf file, i'm using avada theme wordpress, and i need to create a custom layout of all my portfolio pages, i would like to dynamicly display my pdf files and the user should be able to see them on the portfolio page.
I've tried to use Custom field dynamicly and to display the field as an array, but all that i keep having on the frontend is just the pdf url. i've tried to use the pdf custom field as an embeded field too and i've installed the embeded pdf plugin but the results are the same. Please if anyone can help thaank you
Related
I have my own html to display all products inserted in WooCommerce. But I am unable to show it in my styling. I have searched it but unable to find any good solution.
Please help.
You have to learn about wordpress templates hierarchy that all files how it works?
https://developer.wordpress.org/themes/basics/template-hierarchy/
Suppose You want to create single page of product then create a new file into your theme with name single-product.php then single product url automatically render this file.
As same you want to create shop page (Where all products should shown) then create a file into your theme with name archive-product.php then shop page automatically render this File
For add to Cart functionality there are lots of plugin that can be used.
I'm going to create a simplenews newsletter for my site and I'm going to edit its template.
In this template I can insert a view to display the latest news of my site.
The view is correctly embed into my newsletter with this code:
$view = views_get_view('latest_news_newsletter');
$view->set_arguments(array('mycontextualfilter'));
print $view->preview('news_newsletter');
$view->destroy();
Everything is ok but I can't customize the results of my view, I can modify the templates of my fields and I see a good preview but when I embed this view in the email template I don't know which theme it uses, in other words I embed a "raw" view.
Is there a function to force the theme of the view that I'm going to embed?
Have you tried to use embed view function ? :
https://api.drupal.org/api/views/views.module/function/views_embed_view/7.x-3.x
I am creating a form on my Wordpress site.
I want to add a custom field in the form that allows the user to attach an image to use as the featured image.
I also want to be able to insert the image from a media library.
What code would allow me to add a custom field like this to the form?
The Best Solution : https://wordpress.org/plugins/user-submitted-posts/ Custom Fields + Upload Image Front-end
I am putting together a site in wordpress, and we want to use the gallery for a product section. The problem is, the gallery seems to only point to the attachment file for the image, and I can't seem to change anything (add meta keyword, desc, etc..)
Is there a way to just make the gallery images point to a page? or is there a way to edit the html for the pre-generated "attachment" pages?
The [gallery] shortcode can be manipulated. But if you want a customized attachment page, you just need the template attachment.php in your theme files.
Here's one tutorial about it: How to Create a Custom Single Attachments Template in WordPress.
In this article, we will show you how to use the additional fields in the media uploader and display them in a custom single attachments template.
Why can't I see attachments to comments in the array-shift profile of Drupal? When I used the Array Shift theme in the array-shift profile of Drupal, I can't view attachments in the comments, but if I switch the theme to Garland, I can magically see the attachment then. Why? How can I get the array-shift theme to display the attachments, too? I've tried tinkering with views, template files, admin settings all with no success.
The problem was that the Garland theme was using a field rowstyle, which showed the attachment table, and the array-shift theme was using a node rowstyle, which will not show the attachment information without coding it into the file. I had to use code like this:
echo $field_attachment[0]['filename'];
in the node.comment.tpl.php file. Using the devel module showed me exactly what field names to reference for this.