Questions tagged [wordpress]

21190 questions
0

votes
0

answer
27

Views

Cannot read property 'btn' of undefined

For this script we will assume that all database calls are working properly
Joseph Williamson
0

votes
0

answer
2

Views

Accessing Wrapping Wordpress Shortcode Content From Another Shortcode

I have two plugins. A core plugin used provide store information and an inventory plugin that retrieve inventory from any given store within a database. The core plugin has a shortcode called store, it can be passed in a specific store's id or if not passed in within the shortcode it uses a default...
Sebastian Flores
1

votes
0

answer
9

Views

How do I add a custom field to products in specific category

I'm trying to add a custom field to the single product page for products in a specific category. I'm having problems with the conditional logic tho. This is what I've got so far: function cfwc_create_custom_field() { global $product; $terms = get_the_terms( $product->get_id(), 'product_cat' ); if (i...
Paudun
1

votes
2

answer
6k

Views

Can I add featured image to a page (WordPress)

I know, we can add a featured image to a post WordPress. But I want to know, can we also add a featured image to a page. If so, please share how. Thanks Guys! I have static page call 'homepage' in a template called 'HomePage Template' This is the code for HomePage-Template.php Primary Question: Is...
yeshansachithak
1

votes
1

answer
937

Views

How do I create a shortcode that displays a youtube video from its id in wordpress?

I am trying to write a shortcode that displays a youtube video when the user puts the id in. For example my shortcode would look like this: [youtube id="SP6abPzY300GVnc8pGr8qqd6U0eABNPHf6"] In the front end this would then display the youtube video on my blog page. The code I have so far is: funct...
Neelam Khan
1

votes
2

answer
1.3k

Views

Can't use the variable from functions.php in header.php

I have this simple global variable for calling image path. I put it in functions.php so it can be used in any pages. // Inside functions.php $img = get_template_directory_uri().'/assets/img/'; // Inside header.php
hrsetyono
1

votes
2

answer
3.1k

Views

How to make WordPress meta boxes specific to a page template?

Below is some code I have for meta boxes, is there any specific way to limit this to a single page template like template-servicesinner.php or page-plain.php? $prefix = 'tga_'; $meta_boxes[] = array( 'id' => 'project-box-1', // meta box id, unique per meta box 'title' => 'Project Box 1', // meta...
user2480082
1

votes
2

answer
1.5k

Views

Why is this PHP foreach loop only executing once?

Trying to debug some issues with WordPress' notorious pseudo-cron. Thought about putting this on WordPressAnswers but I think this is less about WP and more a basic PHP question on a foreach that seems to never get past its first run. (Yes, definitely looked at a bunch of similar questions, but no l...
Sapphireblue
0

votes
0

answer
121

Views

Multiple thumbnails in checkout section on woocommerce/fancy product designer

In my Woocommerce website users can design their own up to 6 different images via Fancy product designer plugin. I'm trying to output those users thumbnails on cart items in checkout page instead of just showing one product image. (example photo) $dom = new DOMDocument; libxml_use_internal_errors(tr...
william
1

votes
3

answer
4.6k

Views

Wordpress Get unique custom field values in a list

I have a whole list of directors but would like to display only their unique names not duplicates. Something that looks like director A, Director B, Director C,... NOT director A, Director A, Director B, Director C, Director C,... I try to do this with array_unique but it doesn't seem to put any dat...
Phil
1

votes
2

answer
225

Views

Changing the domain name in WP multisite - multidomain portal

I changed the domain to a site on my word press 3.7 multisite (subdirectory) multidomain installation. All wents fine but I cannot login anymore as superadmin to the domain changed site. Also if I pass from the supersite to the domain name changed site, the portal ask again for credentials and doesn...
user1847437
1

votes
3

answer
17.6k

Views

Warning: require(/wp-includes/load.php) [function.require]: failed to open stream

I uninstalled the W3 Total Cache plugin and added the WP Super Cache; however, the second plugin didn't get activated. I believe it was due to some W3 Total Cache files still showing on my blog and I went into FTP to remove them. Now I'm getting the below error message: Warning: require(/wp-includes...
Chaitanya
1

votes
1

answer
374

Views

Wordpress pagenavi output at top of page

I have a custom post type through a plugin and I'm using the pagenavi plugin. The page navi plugin works fine apart from it appears at the top of the content instead of at the end of the table. I've tried all sorts of placements with the wp_pagenavi() function and all don't work. I need help. code i...
jolen
1

votes
1

answer
20.9k

Views

Php Result page to be displayed on same page

This is my coding for the search form: Search The thing is , When I submit this form on my web page , It goes to the php Results page and displays the results. But the thing is that it is just a plain page with just the results displayed. My search page : www.mysite/test/certification-database-sear...
Nau Nau head
1

votes
5

answer
963

Views

How to create custom post types in WordPress?

I want to know the procedure of how to create custom post types with WordPress. I will be thankful if anyone help me with complete procedure of code and plugins. I will also be writing a blog post regarding this issue and I need help from top contributors of Stackoverflow.
Waseem Abbas
1

votes
6

answer
2.5k

Views

Wordpress Sticky navbar when the admin bar is present

I used this sticky jQuery plugin in my site for the top navbar. jQuery Sticky It works correctly, but when the WP admin bar is present that cover the top navbar. I tried to dependency the stickiness to the admin bar: jQuery(document).ready(function($){...
agva
1

votes
1

answer
1.3k

Views

Wordpress orderby meta_value not ordering properly

I have a custom post type called 'events' and I am to display the first 4 more recent events in event date order on the home page. I have got the events to show on the home page however the ordering doesn't seem to be working (see below the example). It seems to be ordering in its own way. $args = a...
CarlTaylor1989
1

votes
1

answer
1.8k

Views

WordPress WP_Query: Display custom post type based on custom meta value, and also order on another custom meta value

I am using the WordPress plug-ins Advanced Custom Fields, and Custom Post Type UI. I have built a WP_Query to display a particular post type, filtered by a particular custom field value. $loop = new WP_Query( array( 'post_type' => 'news', 'meta_key' => 'news_story_type', 'meta_value' => 'release'...
Patrick Moore
1

votes
1

answer
6.6k

Views

WooCommerce - Adding product category to order-details table

Here's what I'm attempting to do and where. In the check out process for an order, in the plug-in WooCommerce; you are taken to a page when the check out is process is complete. It displays an overview of the order details. The template file used to output this page is order-details.php. Here's wh...
JohnMcCarthy
1

votes
3

answer
2.5k

Views

ContactForm7 - Check if Checkbox is Checked

I'm stuck on how to check whether or not a checkbox has been selected using jQuery. Basically, if the checkbox is checked then I need it to run a function. In the WordPress post, I only have to use the shortcode which is using this id: [contact-form-7 id="78" title="BusinessForm"] however, it is ou...
DannieCoderBoi
1

votes
3

answer
2.3k

Views

WordPress: Remove “Parent” dropdown from category form

Hi I've downloaded a plugin "Simple Staff List" and it does what I need but I don't want editors to create a sub-category. How can I remove/hide the "Parent" selectbox on the form?
moonunit7
1

votes
1

answer
7.5k

Views

Display query custom table on Wordpress

I want to display query from custom table on my wordpress page: table name: wp_formmaker_submits field to display: element_value (with 6 rows on each data) This is the query result: 2014-07-2211:13:00SpeedMacLindseyNewYork2014-07-2211:22:00FedExJackChloeLondon2014-07-2211:42:00DHLSteveDannoHawaii It...
vincmeister
1

votes
1

answer
3.3k

Views

Multiple Post Thumbnails $imgURL

I have a title with a background image and in a template file I need to use the Secondary Image of Multiple Post Thumbnails plugin instead of the feautured img. This is the code at the beginning: .header-image { border:none; color:black; background: url() no-repeat center center fixed; -webkit-back...
B_etta
1

votes
1

answer
428

Views

Automatically create site in multisite Wordpress installation

I have a multisite Wordpress installation that I want to connect to a different application via webservices. I'm getting a list of users and I need to create sites automatically. I'm not sure how exactly to do that. Any tips would be appreciated. Thanks.
sis
1

votes
2

answer
1.8k

Views

How to connect to WordPress database remotely?

I have a WordPress website, which is not done by me, all I need to do is connect to its database remotely and query some results from its database. The point is that I don't know anything about WordPress, and I saw that the database information are written inside the wp-config.php file, when I opene...
tett
1

votes
1

answer
438

Views

Add more structure tag to permalink?

I'm new in wordpress .I wondering is there anyway to get the category id in permalink ? My current permalink is : http:///example.com/%category%/%post_id%-%postname%.html http:///example.com/music/1-hello.html Now my music category_id is 2 , how to add this category_id to permalink ? I want to this...
Asamoa
1

votes
2

answer
7.5k

Views

@Font-face not working on IOS

So I am working on a WordPress website and on each page I have an H1 tag for the title of that page. I am using a special font using @font-face and it works great on windows in every browser, but when I switch over to a mac it won't display the h1 tag its just white space. I have tested this in saf...
Drew
1

votes
1

answer
1.3k

Views

calling public function from another php

I'm working on WordPress plugin where I have 2 php files. class.php has code as: class Plugin_Name { public function say_hello() { echo "Hello"; } } Now I want to call this say_hello() function from another welcome.php file. I tried $hello_function = new Plugin_Name(); $hello_function->say_hello()...
MANnDAaR
1

votes
2

answer
17

Views

php user role not displaying

what is wrong with this code? I really just want to display the current users role, but it seems impossible :-( I have tried this: And this: and about 100 more, but nothing seems to work... (I have tried with plugins, php snippets, functions.php, anything) Any help would be much appreciated :-)
M Nielsen
1

votes
2

answer
2.6k

Views

Custom 'success' message after submitting comment on Wordpress

I need to display a success message on successfully posted comment on Wordpress. How to do this?
tara123
1

votes
1

answer
654

Views

serialize with add_post_meta

i am using cmb2 plugin to create a grouped custom meta boxes for a custom post type. everything from that side is working fine. i have also created a custom form in the front end to update the custom post type in it's entirety. the problem which i am having is that my grouped custom meta boxes are n...
Ahm3d
1

votes
3

answer
635

Views

Wordpress Malware - How do I remove it?

Today I went to my wordpress site which is self-hosted and I got a warning in Chrome saying "Attackers currently on keitarotds777.onlinepharmacy24h.net might attempt to install dangerous programmes on your computer that steal or delete your information (for example, photos, passwords, messages and c...
user730952
1

votes
2

answer
2.4k

Views

How to remove parent category from Yoast breadcrumbs

I'm having a bit of hard time trying to get this one link/category disappear from my bredcrumb path. The path goes as follows: home/customPostTypeCategory/subCategory/child/ , so what I need to get done is to get that customPostTypeCategory to go away. So as a clearness, this is a Custom post type...
Shamppi
1

votes
2

answer
3.4k

Views

I am unable to find robots.txt file in server but it is showing in url

I am totally new. This may sound silly for you guys but i am stuck with it. On the site i am getting a robots.txt file. But when i look into the server there is no robots.txt file. But it can be access with the url: goodearthtermiteandpest.com/robots.txt Please do help me why this is happening and...
Hasnain Ali
1

votes
1

answer
6.4k

Views

How to update jQuery on WordPress?

how to update jQuery version 1.6.2 to 1.8.2 on WordPress ? I have tried using the jQuery updater plugin and the following code : if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); function my_jquery_enqueue() { wp_deregister_script('jquery'); wp_register_script('jquery', "h...
beyondacr
0

votes
1

answer
9

Views

Enqueue jquery in wordpress?

Im having some trouble adding jquery libraries to a custom wordpress plugin. It's telling me it cant find variable jQuery. Any help is much appreciated. simplepluginclass.php includes functions.php include plugin_dir_path( __FILE__ ) . 'inc/functions.php'; functions.php jQuery(document).ready(func...
jsky
1

votes
2

answer
1.2k

Views

Render wordpress shortcode within page content

I have written a wordpress plugin. It is a collection of shortcodes which fetch, parse and render data from an API. I am now currently writing a theme to support this plugin. I'm noticing that Wordpress seperates shortcode content from editor content and renders them seperately. Here is an illustra...
eggmatters
1

votes
4

answer
2.8k

Views

codeigniter returns 404 for everything inside subfolder

In my development environment (Mac OS, Apache, CI app inside a WP folder) my app works fine. Today I deployed it to server (Ubuntu Server, Apache, same CI app inside WP folder) and everything that I try return the 404 page. This is my app/.htaccess: SetEnv CI_ENV development RewriteEngine on Rewrite...
leozera
1

votes
2

answer
399

Views

WordPress menu post featured image

I have a menu with multiple dropdowns. I want to show bellow or beside the link of a post or posts in a menu dropdown the featured image. Is it possible? I've attached an image to this message. I don't want to know how to style it or something like that. So let's say I have "Siguranta", I want to...
Ionut
1

votes
1

answer
640

Views

wordpress - front end css applied in admin panel

I am working on a plugin which loads its own css for front end and it is working fine. But the same css is also being applied for admin dashboard. i want to prevent the plugin css loading in admin dashboard. I have registered the css styles and enqeued prpperly to init but not able to understand wha...
krishna89

View additional questions