Forum Replies Created
Viewing 6 posts - 1 through 6 (of 6 total)
-
AuthorPosts
-
Joseph Shrock
ParticipantThat works, thank-you so much!
Joseph Shrock
ParticipantWould you mind giving me the correct syntax for this, so I can just drop it on the page? - Thanks!
Joseph Shrock
ParticipantCould you share the exact syntax I would need to use for that:
<?php get_post_custom() ?>is not working.
Joseph Shrock
ParticipantThank-you and also thanks to some code I found elsewehere, I was also able to get it enqueued via a wp-plugin called Code Snippets but it would have also worked in the functions.php file as well.
<?php function pwwp_enqueue_my_scripts() { // jQuery is stated as a dependancy of bootstrap-js - it will be loaded by WordPress before the BS scripts wp_enqueue_script( 'bootstrap-js', '//stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js', array('jquery'), true); // all the bootstrap javascript goodness } add_action('wp_enqueue_scripts', 'pwwp_enqueue_my_scripts'); function pwwp_enqueue_my_styles() { wp_enqueue_style( 'bootstrap', '//stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ); // this will add the stylesheet from it's default theme location if your theme doesn't already //wp_enqueue_style( 'my-style', get_template_directory_uri() . '/style.css'); } add_action('wp_enqueue_scripts', 'pwwp_enqueue_my_styles'); ?>And here is the one used for TailwindCSS
<?php function pwwp_enqueue_my_styles() { wp_enqueue_style( 'bootstrap', '//unpkg.com/[email protected]/dist/tailwind.min.css' ); // this will add the stylesheet from it's default theme location if your theme doesn't already //wp_enqueue_style( 'my-style', get_template_directory_uri() . '/style.css'); } add_action('wp_enqueue_scripts', 'pwwp_enqueue_my_styles'); ?>Joseph Shrock
ParticipantThanks, I also had to add float:left; to get it working - thanks!
<ul style="list-style: none;"> {% for item in post.puppy_photos %} <li style="display: inline; float:left;"> <a href="{{ item.large.url }}" > <img src="{{ item.thumbnail.url }}" width="{{ item.thumbnail.width }}" height="{{ item.thumbnail.height }}" alt="{{ item.thumbnail.alt }}"> </a> </li> {% endfor %} </ul>Joseph Shrock
ParticipantWhat would be the easiest way then to get TailwindCSS working in MetaBox views - can we just drop in some code or pull in a cdn-url in the "CSS tab" of views perhaps? An example provided would be very helpful, please?
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)