WordPress stripping out BR tags, need assistance
Don’t use the_excerpt() if you want to have line-breaks 😉
Don’t use the_excerpt() if you want to have line-breaks 😉
I was able to figure it out. embed tags do not work with pdf’s because it does not render through the browser. Using the object tag worked: <object data=”http://example.com/wp-content/uploads/…somefile.pdf” type=”application/pdf” width=”1000px” height=”1200px”> <p>It appears you don’t have a PDF plugin for this browser. You can download the pdf <a href=”http://example.com/wp-content/uploads/…/somefile.pdf”>here</a> </p> </object>
I got the following tutorial a very good start for a widget creation: How to Create a Custom WP Widget — WPBeginner And I used the tutorial and made my own first widget for my plugin. You can get all my code here in Github.
As for a function like wp_nav_menu, it is very well documented in the codex as you can see from the link. Some functions are very well documented, others not that well. You can do the following Start at the codex. You’ll find (almost) every native function that WordPress uses in the codex. Like I said, … Read more
Given the amount of customization you’re looking to make, your best bet may be to integrate a custom Walker function. From the Codex: For deeper conditional classes, you’ll need to use a custom walker function (created in the ‘walker’ => new Your_Walker_Function argument). The easiest way to build a new walker function is to copy … Read more
The best and easiest solution (imo) would be to develop your design directly in the Underscore theme. This way you will code only once the design – you won’t have to redo the dynamic parts (like the menu items, widgets and other parts managed by WordPress). The alternative would be to code your design in … Read more
You can create custom templates in WordPress defining the template name at the top of the template. This is a basic template that should help you get started. You can save your template with a file name like tmp-mycustomname.php and put it in your theme. You probably should create a child theme where you can … Read more
To add attributes to the menu’s li elements, you’d have to write your own custom walker that extends the default Walker_Nav_Menu class (which is itself an extension of the Walker class). For more info: https://codex.wordpress.org/Class_Reference/Walker But as itemprop=”url” should normally be added to anchor elements, you could use the nav_menu_link_attributes filter. For example, as per … Read more
The theme uses the_excerpt() instead of the_content(). I had created a child theme before (so I don’t modify the source theme directly: only the child one), so I only had to copy/paste the PHP file (archive.php) from source theme to child theme, and change the_excerpt() for the_content( __( ‘Read more ›’, ‘my-domain’ ) );
I used this to show images on slider .Try this <div class=”col-md-12″> <div class=”carousel carousel-showmanymoveone slide” id=”carousel123″> <div class=”carousel-inner”> <div class=”item active”> <div class=”col-xs-12 col-sm-6 col-md-3″> <img src=”https://wordpress.stackexchange.com/questions/217614/<?php echo plugin_dir_url( __FILE__ ) .”img/download-1.jpg’; ?>”></div> </div> <div class=”item”> <div class=”col-xs-12 col-sm-6 col-md-3″> <img src=”https://wordpress.stackexchange.com/questions/217614/<?php echo plugin_dir_url( __FILE__ ) .”img/download-1.jpg’; ?>”></div> </div> <div class=”item”> <div class=”col-xs-12 col-sm-6 … Read more