Displaying content of div from the posts to the homepage on WordPress

I have this div in all my posts on WordPress:

[div class="price"] $123 [/div]

I would like to display the price within these divs on the homepage, just beside the post titles. How is this possible?

Solutions

This is a shortcode that you are using in your wordpress theme. Direct you can't Use this beside your post title. You need to do some programming tricks.

Alternate option is apply some css that will do the trick.

[div class="price alternate_opt"] $123 [/div]

NOTE: I am not sure but mightbe class="price alternate_opt" would generate a new class alternate_opt, then apply some css on this class.

Tags: Wordpress

Similar questions

Fill div with overflow content of another div
I am trying to build a book styled website where the content flows on two pages, but how can I build it in a way that the text from the one div, when it overflows, it goes to the next div and not just scrolled down? I will need to implement this with wordpress as well in the end, so I will need to code something to do this for me. I need to make it...
ajax refresh the whole page inside a div instead of reloading the div content
Ajax refresh the div. but the thing is it refresh the whole page inside the div. it's like page inside page. i know that i did something wrong. I'm working on a wordpress website(locally). where i want to change the images of the presenter as soon as there shows begin. Ajax script looks fine, but doesn't work the way i want. So, i need your help gu...
Get div height befor the div content is fully loaded
I've got a button, that when I click executes a js code. Like this. The first time it loads the page works wrong, but after have the images, etc, in cache it works ok. How can I wait that the content is fully rendered to execute the height calc? All of this without use delay functions and with out use a plugin. There is a function like $(windows).r...
content inside extended div outside of parent div not showing in mobile
I'm using the following CSS to allow my content on a wordpress page to extend outside of the parent div. It worked great except when I view the website on a mobile device. The content is not adjusting according to the size of the browser. Any advice on fixing this issue? .extended-content-container { width: 500%; margin-left...
How to automatically fill input with content of div, both input and div displayed on the same page?
Input (placed in functions.php, but displayed on single product page) Div = Breadcrumbs => also displayed on single product page. It stands for class .woocommerce-breadcrumbs or .woocommerce-breadcrumbs a. My idea is using some kind of javascript code in the Theme Header (header.php), cause its displayed on every page of the website, so it should a...
Hide parent div if child div doesn't have content
I'm trying to hide the parent element in Wordpress if the child has no tags. Đ¢his is the code: I want to hide all div #tags if php string is empty.

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.