Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [code]

The tag has no usage guidance.

0
votes
0answers
10 views

How to set serial number in admin panel by using switch case in wordpress?

function custom_order_product_columns( $column, $post_id ) { switch ( $column ) { case 'catalog_dealers' : echo get_post_meta( $post_id, 'catalog_dealers', true ); ...
0
votes
0answers
30 views

load plugin in code snippet

I'm using "PHP code snippet" in my WordPress website to create a "form" so i can read and write back to my database. Is there a way i can make a "text-area" with style editing options instead of ...
0
votes
0answers
11 views

need code for automatic clone website in wordpress multisite [on hold]

I use a multi site in WordPress. I created a subscription form for users to post a pro Restrict Content Pro - Site Creation. When users sign up, they can create a new site with the same format I have ...
0
votes
1answer
23 views

How to code custom special page

I'm looking for how to code custom "special" page as use many plugins. An idea is that I have in theme links to the custom special page. Then admin can chose which of his pages is the one "special" ...
0
votes
1answer
44 views

Wordpress redirect all 404 pages to the Homepage

I want to redirect all 404 error pages on my WordPress site to the homepage, or to a specific page. Any advice?
0
votes
1answer
80 views

Fatal error: Uncaught Error: Call to undefined function get_header() [closed]

Fatal error: Uncaught Error: Call to undefined function get_header() in C:\xampp\htdocs\allegiant\index.php:1 Stack trace: #0 {main} thrown in C:\xampp\htdocs\allegiant\index.php on line 1 I ...
0
votes
1answer
25 views

Open all external links in new window - need help with the code

I'm using this code to open all external links in new window (site is based on Wordpress): /* OPEN ALL OUTBOUND LINKS IN NEW TAB */ function autoblank($text) { $return = str_replace('href=', 'target="...
0
votes
0answers
26 views

Why am i not Getting Install Prompt in PWA

I implemented PWA for my static site. service worker register successfully and my page is also working in offline as I expected but the real problem is in add to Home screen I included manifest.json ...
0
votes
2answers
25 views

Code is providing a row of data but not formatting it as table

I am using the following code: function seconddb() { global $seconddb; $seconddb = new wpdb('username','password','g3boat5_G3_Genba','localhost'); } add_action('init','seconddb'); // add the ...
0
votes
1answer
86 views

Display Data in Table from External Database in WP using Shortcodes

I have successfully coded a secondary database connection for my wordpress site in the functions.php file in wordpress. I have used the following to create shortcode and run the data to my table where ...
2
votes
1answer
118 views

Connect Second Database to Wordpress

I am trying to connect a second database to my wordpress site so that I may ask for data from it and display it in a table on my site. I have tried multiple ways of doing so. I have tried to use php ...
0
votes
2answers
35 views

Search Count Wordpress Theme

I have a code that displays results for search but, I need it to include the count not just keyword searched <h1 class="font-thin h2 m-b"> <?php printf( esc_html__( 'Search Results for: %s',...
0
votes
2answers
30 views

How can I put my own code in a wordpress page?

How can I put my own code in a wordpress page? This happens when I tried to
0
votes
0answers
40 views

How to create a featured image for Wordpress-categories (without Plugin and ACF)

How to create a featured image for wordpress categories without plugin or ACF. Can someone help me? On the next step i want to show a list of categories (with the featured-image) on my homepage. ...
1
vote
0answers
22 views

I got an issue after i migrated a site

I recently migrated a site to a larger server. Everything appears to be fine, the site works everything transferred over. The site does have an SSL cert. Recently we started to get flagged as unsafe ...
0
votes
0answers
36 views

Images are not showing up in Wordpress posts?

I uploaded the image to my post, and checked everything like... url,directories,permissions. All things were right but why are my images not showing up?
0
votes
0answers
18 views

How to add specific posts to specific pages in WordPress?

How can I add specific posts to specific pages in WordPress using custom fields and not categories? Actually, I want to assign a specific custom field value to different posts and show them on ...
0
votes
1answer
23 views

How do I validate extra pin field on my WordPress login form page?

I have been able to add an extra field to my WordPress login form using the following code inside wp_login.php file, thanks to stackxchange. add_action('login_form','my_added_login_field'); function ...
0
votes
1answer
19 views

Client on iPad accidentally adding <code> tag to posts while writing

A client of mine complains that text gets 'randomly highlighted' when he is writing Wordpress posts on his iPad Pro. He uses the web interface. I got him to stop deleting the 'highlighted' text and ...
0
votes
0answers
14 views

how to use a sidebar widget with its options in a template

I know that the title of this question is a litle confusing, but this the problem I have recently installed a widget called Youtube Channel Gallery, which displays the latest videos on my website. ...
0
votes
1answer
44 views

Changing input type from text to multi select dropdown - skill taxonomy

Really need help with a wordpress code please. I have a field on a form which adds tags to the post. Problem is, its free for anyone to enter anything. This keep populating the "skill" taxonomy. The ...
1
vote
0answers
21 views

Is there a way to create embed codes from wordpress/buddypress content?

I am looking for a way to create embed codes for content like, posts, images, videos, comments and buddypress content and components to be posted on external websites and apps. So for instance ...
0
votes
0answers
19 views

Write html code in comments

For example i am writing this html code into comment textarea <pre><code class="language-php"><?php echo esc_html( get_post_meta( get_the_ID(), ‘_spp_count’, true ) ); ?></code&...
0
votes
0answers
31 views

'[code]' shortcode to markup programming code does not work

I have been trying to embed some simple code on a practice blog and it has no effect other than to display the tag as text. I am aware there is no code in the image but believe me I have tried. The ...
1
vote
0answers
11 views

How to save inputed data in a textbox [EDITED] [duplicate]

This was asked before. I am re-posting it, edited. So I am making a website using WordPress, and I wanted to make a text box that saves something that is typed in it. Let me explain: Users (signed ...
0
votes
0answers
176 views

Add CodeMirror in a custom TinyMCE button

I'm adding a custom button in the TinyMCE that opens a textarea where I can add code. Now since CodeMirror is included in the core, how do I make my textarea into a proper code editor? Currently I ...
0
votes
0answers
14 views

Code for cron to delete posts that contain specific expression (e.g. “unable to fetch” every 30 minutes

Please does anyone know a code that can automatically delete wordpress posts that contain a specific phrase? I want to execute it in a cron to delete such posts at regular intervals say 30 minutes
0
votes
1answer
3k views

admin-ajax.php 400 bad request - whats wrong with my code?

I'm getting a 400 bad request from admin-ajax.php & warnings from pagespeed insights tell me it's an issue. Can you see any obvious issues in the code in our admin-ajax.php file? <?php /** * ...
0
votes
0answers
11 views

Having Trouble Removing Featured Image from Portfolio Post in Agile Theme

I have been trying to remove the featured image from the portfolio page using the Agile theme in WordPress. I have tried multiple solutions throughout these forums but I cannot seem to solve it. Any ...
0
votes
0answers
45 views

Changing blog grid

I got a "problem" This is my website. I want to make the blog grid look like this on the most popular news: Instead of this: But if im trying to change the code, it will change for all the blog ...
0
votes
1answer
27 views

How to change the link on the logo at the menu?

I'm working on my site, it been done with a site builder so the logo on the menu has a default link to my homepage, but I need to change this link so it goes to another page instead of the default ...
0
votes
1answer
273 views

Updating User Meta using Theme My Login with Custom Fields

I am trying to create a better login and registration form on wordpress. I have installed TML by Jeff and it works wonderfully. However, I am trying to further extend the registration form. I have ...
0
votes
1answer
19 views

Disable File Editing function

Researching fixing errors while validating my site, I got brave and clicked Enable button at Appearance > Editor and went pass the "warning" - now getting nervous bc don't want to accidentally mess ...
1
vote
1answer
71 views

Wordpress change Language not working

My issue is, that I want to change the Language to German (de_CH) and BBPress etc. should change the language too. I know not all Plugins are available in German. However whatever I do, add them ...
0
votes
1answer
15 views

Table styles disappear when updating content

The tables on my website all have custom code for their style. Lately, when I go in to edit the content of the table (not the code), the style will completely disappear on the webpage when I update it....
0
votes
2answers
53 views

Drop down list code for sidebar

For starters, I'm not a programmer but I'm good at cut and paste. :) I want to create a drop down list that displays each post and I've done that by putting this in my functions.php child theme file ...
1
vote
1answer
41 views

Insert custom PHP head above <html> in WP pages

I've made a WordPress site. Before, I had a coded site in HTML. My new WordPress site is still in maintenance mode. But, I want to insert a PHP code above all the website content. This is my code: &...
0
votes
1answer
42 views

How to do a code in php and have text before it? [closed]

So I have this code: the_title() And I am trying to add some text before it. So, it would end up like this: PAGE TITLE: (page tile) => PAGE TITLE is what I am trying to add before my code. However, ...
0
votes
2answers
71 views

WordPress code problem [closed]

I have this code shown in the picture on top of the search bar. It appears on all pages. I have checked all the plug-ins and it is still there. I don't know what to do next.
0
votes
1answer
10k views

how to remove the top navigation bar or header top on wordpress website?

My website (bargainbosss.com) all of a sudden started displaying a navigation bar at the top of the website. I don't have that menu option checked, only a primary menu. I can't figure out how to ...
0
votes
0answers
18 views

Manage recurring event time

Hello I'm trying to make a list of medications, the time to take them is recurring so I must have a repeater and an opening time. So I created it as follows: <form action="#"> <input ...
0
votes
1answer
2k views

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'greenday_head' not found or invalid function name

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'greenday_head' not found or invalid function name in /home/xnvrtebr/public_html/Blog/wp-includes/class-wp-hook.php ...
0
votes
0answers
54 views

Send notifications to custom post author when custom post is edited

I've made a custom post type that works as a ticket service. I need to send notifications to the owner of that post (author) when the post is edited (changes status or has been saved), usually edited ...
1
vote
1answer
37 views

What kind of data is that?

I'm going to use a plug-in in WordPress called RegistrationMagic. And I need to access the data saved for further use in front-end for a reason. I was looking the tables in MySQL and found the data ...
0
votes
1answer
13 views

Website Tablet Check Out Field Issue

So on my website of http://www.camerabeanbags.co.uk/checkout/ if you set the browser to 768px wide the 'phone' and 'e-mail address' fields can not be clicked in for text to me typed in. These work ...
0
votes
1answer
218 views

style.min.css code issue

Okay, My site report is here that I am developing - https://tools.pingdom.com/#!/bBE0r0/www.waggypetservices.co.uk/ My only issue now is that something is calling style.min.css when this doesn't and ...
1
vote
1answer
2k views

Add footer.php to Wordpress child theme

So I am using the theme of 'Mesmerize' I have created a child theme but want to change some of the footer php within the child them so when there is a theme update the changes done reverse. This is ...
0
votes
0answers
89 views

wp_editor save all content

Sorry my english is very poor. I have create a new y theme for wordpress, and create new category for user download, but in the backend(admin) i have add wp_editor(), in subcategory, but when i save ...
-4
votes
1answer
22 views

Where do I go to add a tag before the closing body tag?

I need to disable Rich Pins for one post and was told to "add this tag to the header of your page before the closing body tag. " Where specifically do I access that to add the tag? Thanks in ...
2
votes
1answer
57 views

Can I run custom php on specific pages in wordpress?

I'm making a wp site as a new frontend to an in house system that I designed a while back. I want to be able to run custom php for grabbing different bits and peices of stuff from my database (mysql) ...