2022 Developer Survey is open! Take survey.

Questions tagged [html]

Covers all flavors of HTML: HTML5, XHTML and old-school HTML 4.

Filter by
Sorted by
Tagged with
0 votes
1 answer
42 views

Make PHP work with HTML tags

I have the required code for what I want <?php if ( is_singular() ) { <?php if (get_post_meta(get_the_ID(), 'square_image', true)) { ?> <img src="<?php echo get_post_meta($...
user avatar
  • 165
2 votes
1 answer
34 views

Javascript code inside "<# #>" in core WordPress files .php

I found some interesting embeding JavaScript mix with HTML in WordPress php files, for instance: <?php // Template for the Attachment Details two columns layout. ?> <script type="text/...
user avatar
0 votes
0 answers
27 views

Time Delay a URL Redirect for Specific Page

I need to set a time delay redirect for a specific page. Reason is because we have a URL redirect on the specific page and it is not registering for a Google Analytic page visit conversion. So we need ...
user avatar
  • 63
0 votes
0 answers
20 views

how to changes mobile menu toggle breakpoint in Wordpress

I want to change the mobile menu toggle breakpoint in twenty-twenty one theme, want to show on 767px but it shows on 481px by default.
user avatar
0 votes
2 answers
26 views

How can I get the search form to be selected automatically?

There is an icon to open the search form on my site, and when it is clicked, the search form opens in full screen. I want the search form to be selected automatically, how can I do that? Here: https://...
user avatar
1 vote
0 answers
23 views

Populate dropdown with Child Pages based on Parent Page chosen

I'm trying to populate the Child Page dropdown with that of the selected Parent Page - If a specific Parent page is chosen it should fill the second dropdown with all Child pages listed under that ...
user avatar
  • 11
0 votes
0 answers
16 views

Cascading dropdown select search based on Parent Page & Child Page

How would I create a cascading dropdown select search where the first dropdown would host selected Parent Pages and the second to display the Child Pages of the selected Parent. When submit button is ...
user avatar
  • 11
0 votes
0 answers
7 views

WordPress cascading dropdown selection search based on Parent Page & Child Page

How would I create a cascading dropdown select search where the first dropdown would host selected Parent Pages and the second to display the Child Pages of the selected Parent. When submit button is ...
user avatar
  • 11
0 votes
0 answers
17 views

Display WordPress search results based on the selected Sub-Category

I'm trying to create a search using dropdowns in WordPress. I've got two dropdowns, 1 - Parent Category and 1 - Sub-category. The Sub-category will show automatically based on the selected Parent ...
user avatar
  • 11
0 votes
0 answers
12 views

Adding FAQ schema to Category Description fails when switching to visual tab

When I add the faq schema code to the WYSIWYG-editor in the category edit page it seems to work fine, but as soon as I switch to the visual tab of the editor all the faq schema code gets replaced with ...
user avatar
0 votes
0 answers
28 views

PHP inside echo HTML

I am a little bit confused about the following code: i need to add span class="<?= $styles['core']; ?>" <?php if( ! defined( 'CP_VC_ACTIVE' ) ) { echo '<li><span class=&...
user avatar
0 votes
1 answer
48 views

Ignoring <a> links from the_excerpt

I am looking for a way to ignore any <a> links in the content WP displays in the the_excerpt - is there a way I can achieve this? The excerpt is not actually used on the WP page itself, so the ...
user avatar
  • 3
0 votes
0 answers
33 views

html form: redirect page after form completes submit function and posts data

My form looks like the following, it's inside functions.php <form style="text-align: center;" action="https://website/checkout/" method="POST" onsubmit="return ...
user avatar
0 votes
0 answers
13 views

Putting custom html/js page into Elementor as it's own block

I have a working custom html/javascript page that I created and then FTPd into my wordpress site as a custom template which I'm applying to a blank page. However, I have elementor pro and though I may ...
user avatar
  • 113
0 votes
2 answers
50 views

Add Paypal button redirect to a specific page after completing

I have created a new page on my WordPress site to test the paypal payment flow. I have subscription based products. Attached code is for the paypal subscription button code. <div id="paypal-...
user avatar
0 votes
0 answers
20 views

How to save Setting pages data to the database?

I have created a setting page and I have a basic form in there I want to save its data in the database how can I achieve that. This is the HTML form: <label class=""><?php _e('...
user avatar
0 votes
0 answers
15 views

add the attribute value above the english product title

[1 [i have tried each and possible way it is not changing its position ]
user avatar
1 vote
0 answers
17 views

How to Disable auto id attributes in Heading tag?

I don’t know why but WP is automatically adding id attributes to h2 tags. I am not supplying any id or class attribute and I don’t need it. Also, it’s adding type="1" to <ol> tag that’...
user avatar
0 votes
0 answers
23 views

Line break before headings (<h2>) appears from nowhere

So, in the database row i've the following html code in post_content: Solo pochi giorni fa, esattamente il 15 marzo, è stato presentato durante l'ultima edizione del SXSW Online un suggestivo ...
user avatar
  • 101
0 votes
0 answers
22 views

WordPress User Meta value variable into Google Gauge Chart

I am trying to insert a Google Gauge chart on my WordPress site created with Elementor using data from WordPress user meta (current logged in user). Using the code below, the chart is displayed with a ...
user avatar
0 votes
1 answer
21 views

Benefits to using semantic HTML in post content? [closed]

I've been reading up on semantic HTML as a means of improving accessibility and SEO, but I'm still learning about the implications of semantic HTML. One question I have is whether there's any point to ...
user avatar
  • 3
0 votes
1 answer
79 views

php esc_html_e with an html link inside not working

I am trying to use php esc_html_e with a inside and must be missing something since I cant get it to work. My code is simple and is: <p><?php esc_html_e('You are not logged in. <a href=&...
user avatar
  • 1
0 votes
2 answers
27 views

HTML Form Question

I am very new to HTML and PHP and have spent hours trying to find the right questions to ask. I would like to create a simple webform on a page and add a button that will generate text (on the same ...
user avatar
  • 1
0 votes
0 answers
15 views

Background image no longer fits to screen now that project is in php files

When my project was still coded as html files, the background images of my sections of my landing page fit the screen, but since changing it to php files to upload to wordpress these sections leave ...
user avatar
0 votes
0 answers
12 views

Wordpress Post Block Element not properly parsed with the_content filter

I made a small script which echoes the content of all Wordpress Posts on post_updated, deleted_post and trashed_post actions. add_action('post_updated', 'echoAllPosts'); add_action('deleted_post', '...
user avatar
0 votes
1 answer
35 views

Adding Plugin Assets to Header

I am creating a WordPress Plugin. I have already added some pages. But I want to add custom CSS to that pages in the <head>. I am trying: add_action( 'wp_head', 'DisHeaderAssets'); But nothing ...
user avatar
0 votes
0 answers
21 views

I'm trying to remove a duplicate menu, which only appears on the homepage?

I've used Elementor and Elements Kit to create this website. It's accidentally generated a duplicate menu which only appears on the homepage and i'm desperate to remove it. I've tried to use ...
user avatar
0 votes
1 answer
23 views

I want to add the below chatbot html code to index(main) file of WordPress sites how can I do that

It work's locally on my system but how can I make it work in WordPress. It doesn't even show up in WordPress might be because of overlapping <html lang="en"> <head> &...
user avatar
  • 1
0 votes
1 answer
46 views

How to hide "Shipping" label from Woocommerce cart page

I am trying to hide/unset Woocommerce "Shipping"label from the cart page in order to have more width for the shipping calculator. Is there any way to hide only the word "Shipping"...
user avatar
0 votes
0 answers
21 views

List sub categories and corresponding posts of a parent category

I'm looking to list my subcategories and related posts under a parent category page. For reference, I have 3 parent categories: Baby, Toddler and Preschool. The 'baby' category page WORKS with the ...
user avatar
0 votes
1 answer
20 views

Hide Tab Titles from Tabs Block

I have this Tab on my website-- https://prntscr.com/1zii0ab On Mobile, I will like to hide the Titles of 3 of the Tabs, and on Tablet I will like to hide the Titles of 2 of the Tabs. When I used ...
user avatar
0 votes
1 answer
185 views

Add html link in functions.php files of the theme

I use the option that people need to have an account to checkout. So the checkout page is blocked. At that moment you’ll get the message “You must be logged in to checkout”. To improve that customers ...
user avatar
0 votes
2 answers
83 views

Wrapping a Sidebar within <div></div>

I ask if it is possible to wrap a specific sidebar within a <div class="customdiv"></div>. Are there any instructions to add in the function.php file? Thank you. Like this: I've ...
user avatar
0 votes
0 answers
42 views

population category dropdown and sub category onselect

I want to display categories and if the category is selected then display parent's sub categories... I know there is some thread about this question but none of them fit to my problem. I did 2 ...
user avatar
  • 1
2 votes
2 answers
71 views

Add HTML Snippet only on specific pages

I would like to add a HTML Snippet on specific pages (not global). This is the snippet: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:dio="http://docs.dionera.com/namespace/DioML&...
user avatar
0 votes
0 answers
30 views

Is it possible to add wordpress blog to my existing html site?

I have html site and i want to add blog on it, i was thinking to add wordpress in the same folder as my website and just to connect them via link, does anybody know how to do it?
user avatar
0 votes
1 answer
74 views

How to buid wordpress menu with auto width sub-menu items in dropdown menu without any items sharing one line [closed]

How do I buid wordpress menu with auto width sub-menu items in dropdown menu without any sub-menu items sharing one line (appearing side by side).but with an automatic width for dropdown items that is ...
user avatar
0 votes
1 answer
343 views

Using ob_start and ob_get_clean with wordpress shortcode

I am including HTML template in my shortcode by using ob_start & ob_get_clean. Everything works normally but the returned HTML structure is broken. this is how I am inlcuding the html template in ...
user avatar
0 votes
0 answers
33 views

Returning HTML to Shortcode Block

I have spent way too much time trying to clean this up. I am simply attempting to return some HTML from a shortcode, into a shortcode block within the content editor. $next_friday = new DateTime(); $...
user avatar
  • 619
1 vote
0 answers
45 views

Images will not display, when I call them up with html in wordpress, just two blank small spaces [closed]

I am trying to get images to display, when I call it up with html in wordpress. I am using html instead of the image block in wordpress, as I want to animate the images a bit. I also uploaded the ...
user avatar
0 votes
0 answers
17 views

How do I call a value from the datase using ajax

I need to call and display a value for the users using Ajax but I'm not sure how to do it. Currently the plugin I use call it using a query that means the users must refresh thier browser every few ...
user avatar
1 vote
0 answers
82 views

How to store data from multiple forms using ajax and php

I have custom post loop, and for each product I have form. I'd like to store data in array for each click submit button in each product. E.x. Product A with Form and some values (price,quantity) click ...
user avatar
  • 13
0 votes
1 answer
29 views

Do I just put the html in a page when enqueueng or do I also have to reference js file from the html page [closed]

I am trying to get my javascript to work in my page, but I have always just put the html on the actual page, but now am wondering if I am supposed to put the <script src before the html as well to ...
user avatar
0 votes
0 answers
16 views

Search bar for wp menu

i have a search bar in my wordpress menu, which i created myself, this search bar shows results that come only from the database along with some checkbox, and i have an add to menu button as shown in ...
user avatar
0 votes
1 answer
170 views

Noscript not working as it should in wordpress site

This is what I've done in my custom functions mu-plugin: function jsdisabled() { print '<noscript> <div style="margin:auto; display:table; text-align:center"> <div style=&...
user avatar
0 votes
1 answer
58 views

Adding HTML Code to Replace Text in PHP

I want to change my download button for non logged in users. Instead of the download button I want to show a custom HTML code with message to login/register. The below code is hiding the button but ...
user avatar
0 votes
1 answer
43 views

Hide A Class and Add Custom HTML Code Using Wordpress

In my wordpress website I am trying to hide download button from non logged-in user and add a custom HTML to that section. My current code is hiding the download button but not displaying the text. I ...
user avatar
1 vote
0 answers
18 views

Can I change an external script's HTML?

I am using this worldnomads partner quote form in some posts with a script tag, however this external form uses an H1 title which messes up my heading hierarchy. I was wondering if it is possible to ...
user avatar
0 votes
1 answer
146 views

How to use SRCSET with get_the_post_thumbnail()?

My wordpress theme uses get_the_post_thumbnail() to display Thumbnails on Posts. I have set custom image sizes but running it through Lighthouse gives following error. Serves images with low ...
user avatar
0 votes
1 answer
17 views

Multiple TinyMCE on button click is initialized and appended but why only last one is writeable?

I am using a button click to add TinyMCE dynamically. Everything is working except only one issue is that only the last one is writeable. Below is my HTML HTML <div id='add_content_box'></div&...
user avatar

1
2 3 4 5
23