New answers tagged

0

Remember that str_replace looks for an exact match of the 'needle' (what you are searching for; 'haystack' is the thing you are searching inside). So your code is not finding an exact match. If you want to do a 'replace everything that might be within the span codes in that hunk of text', then a regex statement might be in order. This is assuming that the '...


1

which wordpress api could give me a list of all the articles as json? You're already using the right API, just remember it's paginated so you need to request the second/third page/etc in a separate request. It'll pass how many apges there are in the http header I found a particular api doing the above same task as point (1.). is it a standard one? You ...


3

This is expected WordPress behavior. "content" data is WordPress post content data and stored with all the HTML tags that where added in the post. I'm not sure what pieces of information you are trying to retrieve, but I think the HTML tags could work to your advantage. If you were to retrieve the meeting ids then you could filter all the "tr&...


0

If you're happy to do a bit of coding, then start by creating a new page template for your login page, name a file something like page-login.php in your themes root and make that page markup how you want it. Once you have the mark-up in place, add in the following tag, which will pull in the WP login form onto the page for you. <?php wp_login_form(); ?&...


0

Depending on the scope of your project, I would recommend either using ACF (Advanced Custom Fields) which will allow you to create custom fields in your user based on their level, which you can then output into your theme. The outputting part though will require some coding knowledge to do. The other option is to use a system like Ultimate Member, or ...


0

First, move your headings into their sections, so your structure looks more like this: <main> <section> Heading Here Cards Here </section> <section> Heading Here Cards Here </section> </main> Then you can do this in a few different ways with CSS. The simplest way is to add a class to ...


-1

<main> <section> <a href="blogslist.html"> <h2 class="section-heading">All Blogs</h2> </a> <div class="card"> <div class="card-image"> <a href="blogpost.html"> <img src="img/1.png" alt="Card Image"> </a> </div> &...


1

You can change the block to "edit as html" via "more options" and set the soft hyphen, then switch back to "Edit visualy".


0

A simple solution would be just run the loop twice. <?php // set loop $args here so they're in once place ?> <div class="four"> <?php // run the loop once with $args, output left side items ?> </div> <div class="five"> <?php // run the loop again with $args, output right ...


0

This page says that feature was removed from Wordpress a long time ago, so you may have a theme or plugin which has put it back. You can try using the same filter to remove it again. To use the filter you need to add this to your functions.php file: function remove_comment_prompt( $defaults ) { return ""; } add_filter( 'comment_form_defaults', ...


2

Anytime you want to use JavaScript in WordPress, you should enqueue it. Save the JS as a file, ie clickbutton.js inside your theme folder: document.getElementById("defaultOpen").click(); Then in functions.php, enqueue that file: add_action('wp_enqueue_scripts', 'wpse_371294_enqueue_js'); function wpse_371294_enqueue_js() { wp_enqueue_script('...


1

get_permalink() (which is used by get_the_permalink() and the_permalink()) returns the "ugly" URL if the post is not published, e.g. draft or scheduled, but you can use the following function instead which temporarily sets the post status to publish so that we'd get the pretty URL. function get_future_permalink( $id ) { if ( $post = get_post( $...


0

I used the HTML input to save the image, as you can see below. <form enctype="multipart/form-data"> <input type="text" name="support_title" class="support-title"> <input type="file" id="sortpicture" name="upload"> <input class="save-support" name="...


Top 50 recent answers are included