Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have installed a slider plugin called Revolution Slider for my Kallyas theme. I need to add the php line code so that I get my slider working. Can anyone help about where should I exactly place that line?
There is a three ways to insert into the theme and the slider appears in your pages:
For all the pages: <?php putRevSlider( "slider_alias" ) ?>
For show only on homepage: <?php putRevSlider("slider_alias","homepage") ?>
For show on certain pages use: <?php putRevSlider("slider_alias","2,10") ?>. The numbers here are de ID of the pages.
Here the full documentation.
We would have to have see your header.php file / or see how the theme is structured in order to see where the best place would be to insert the PHP snippet provided by revslider.
Are you aware that you can use shortcode inside of your pages / posts instead of using the PHP snippet?
If it is to appear on every page you can add
to the header, footer or content pages (depending on where on the page you want to put it (and changing shortcodeXYZ to whatever the shortcode is).
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
Good Day.
I am developing a multivendor website for my client and I used Dokan. My client would like his vendors to add a (Sample Product Price) and (Bulk Product Price).
Is there any way to add those fields?
He also would like his vendors to add custom tags to their products.
Regards,
Go to dokan plugin directory. then go to the below path
1) templates/products/new-product-single.php
2) templates/products/new-product.php
You can override the new-product.php and new-product-single.php file in your child theme and then add your field. However, there are some other steps required to successfully save them.
These below hooks to save and update the field data.
do_action( 'dokan_new_product_added', $product_id, $post_data );
do_action( 'dokan_product_updated', $post_id );
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm trying to remove the image filename that appears above the image in the lightbox functionality on the single-product page.
My images have a terrible naming structure and it is very distracting to the user to see "IMG_1234.JPG".
Is there a setting in WooCommerce that will allow me to toggle this on and off? Or will I need to change the file by adding/removing code?
Thanks in advance...
If you use any woocommerce compatible template then you'll find a directory named "woocommerce" in your template folder.
If you can't find it then it'll be the wp-contents/plugins/woocommerce/templates directory. In that case your theme doesn't overwrite the default layout. Then you need to find templates(or woocommerce)/single-product/product-image.php file. Around line 21 you should find something as following-
$image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
add // infront of that line (comment that out) as follows-.
// $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
Now search for something rel="prettyPhoto' around in line 31. Remove title="%s" from that line where you find rel="prettyPhoto'.
Again find product-thumbnails.php in the same folder of the previous one. In around 40 you'll see something as follows like before-
$image_title = esc_attr( get_the_title( $attachment_id ) );
Comment this out adding two forward slashes(//) just like the previous one.
Now again in around line 42 search for something prettyPhoto[product-gallery] and when you find it look for title="%s" nearby and remove it like before.
This will remove the title form the lightbox picture viewer.
Instead of all these works you can simply use this following script inside your header.php file or anywhere you may find suitable-
<script>
jQuery(document).ready(function(){
jQuery('a[rel*="prettyPhoto"]').attr('title','').find('img').attr('alt','');
});
</script>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Thank you for viewing my post..
I am currently working on my blog, it is about writing reviews and rating books, and movies.
I have searched for hours for a rating plugin for ME to rate movies and books posts,
but all I found was plugins for visitors for rating posts.
It came as frustrating as hell, I hated wordpress.
I am thinking about going blogspot, but I would have wasted like 12 hours working on wordpress.
So, please any ideas or good/reliable plugin for me to rate movies and books inside my posts, without any involvement from the visitors.
Thank you.
I would use the 'advanced custom fields' plugin and create a field for posts called rating. Then within the single template add some php to see if that field has a value. If it has display the review. You can style the review as you like it within that area.
If you wanted to use a couple of fields, 1 for star rating and 1 for comment that can easily be achieved within that if..loop.
example of loop :
<?php
// check if there is a rating
if(get_field('rating',$id) != '') { ?>
<div class="rating">
I rate this : <?php echo get_field('rating',$id); ?> Stars
</div>
<?php
}
// check if there is a review
if(get_field('review',$id) != '') { ?>
<div class="review">
<h4>My Review</h4>
<?php echo get_field('review',$id); ?>
</div>
<?php } ?>
Using the above you would need 2 advanced fields with the names 'rating' and 'review'
This will check if either exist and if they do for that post display them within the divs on your page.
I hope this helps as an easy solution..
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am using the "Sight" theme by WP Shower to build http://www.dantiesmith-brown.com
I want to get rid of the meta info (author, time/date/etc..) on pages so that the only thing that displays on a PAGE (i.e. everything that is not the "news" tab, which is the blog)
is the name of the page, the line underneath it, and then the body copy underneath that. I would like the post meta stuff to appear on actual posts, but I want it removed from the pages.
How can I do this?
p.s. the WP Shower forum is not very helpful. I posted this same question several days ago and it hasn't even been uploaded to their forum yet..
You have to edit wp-content/thmemes/sight/page.php and remove this part:
by <span class="post-author"><?php the_author(); ?></span> on <span class="post-date"><?php the_time(__('M j, Y')) ?></span> • <span><?php the_time() ?></span>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I know I have a static page for my home page in Wordpress. I also have a page called "Rate Entries" as my blog page. After showing this to my client, and then showing her the admin section of Wordpress, she began typing a paragraph into Pages >> All Pages >> "Rate Entries" >> Edit.
The big problem here, as you all know, is that if "Rate Entries" is my posts page, that page content does not show there, only the posts. Is there any way to add that page content to the top of the posts page? I had hoped to find a plugin to do this, but to no avail.
Assuming you've set a custom page for the posts in the Wordpress backend (Settings > Reading), you just need to add a few lines of code to your index.php file in your theme. Like so:
//grab the id of the page set in the backend
$posts_page_id = get_option('page_for_posts');
//grab the post object related to that id
$posts_page = get_post($posts_page_id);
//display the content if any
if( $posts_page->post_content ){
echo wpautop( $posts_page->post_content ); //uses wpautop to automatically add paragraphs
}
In your case, you can add the code to display the loop below this code.
Hope this helps!
Assuming you want a hardcoded paragraph at the top of entries page before the list of all entries, Why not create a template page, assign it to your rate entries page and hardcode your paragraph in the code so it's always on the top.
Read about page templates here
Update
Have you tried doing a sticky post? that should solve your problem
Here's what I've found that I had to insert into the index.php page in order to get what I need accomplished. Right before the loop that cycles through the posts as crowjonah had mentioned.
<?php $page = get_page_by_title( 'Rate Entries' ); ?>
<header class="entry-header">
<h1 class="etnry-title"><?=$page->post_title;?></h1>
<p><?=$page->post_content;?></p>
</header>
What this does is take the page title and content for the page, and place it right above where the posts spill out. This way, she can edit that text, and it will update on the posts page.
I solved this problem by using a text widget. By using a plugin called "Display widgets" I can make sure that this text only displays on the blog page.