The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

0
votes
0answers
23 views

Cant get “get_queried_object_id()” to work on a category.php page

I am making a category based site with images for every category. I am unable to get the part with get_queried_object_id() to work correctly. At present, I have made it work with the top categories. ...
0
votes
0answers
10 views

wp_editor with custom editor_id not working

When give editor id like my-form[myeditor] form wp_editor doesn`t work and text editor (Html tags) only shown not also visual editor $settings = array( 'media_buttons' => false ); ...
0
votes
1answer
19 views

help with custom shortcode that stopped working

A while back I wrote a shortcode for my site, and it just recently stopped working. I'm wondering if someone can help. The shortcode is called paramtext. What it does is check the value of a certain ...
0
votes
0answers
11 views

rewrite_rule - working fine but broken single post 404

I'm having an issue with my rewrite rule, works fine here: example.com/resources/ example.com/resources/articles/ Also works fine with the pagination here: ...
0
votes
1answer
8 views

media_handle_sideload() returned post_id being incremented

Currently I'm trying to take screenshots of websites. That works great by using mshots and media_handle_sideload. However these screenshots need to be associated with my post. I've made a function ...
0
votes
0answers
19 views

External SQL Database (Login Details) to update wp_users with new users

I have an external database which currently has a Username and Password field, which are plain text (password field not using any hashing). Is it possible for when I update this database that it will ...
0
votes
1answer
27 views

Conditional statement within WP SQL query

I have a form on a Wordpress page posting data to a table called 'members'. I have a second page displaying this data in a table. All is working well. The data is being displayed using: $myrows = ...
0
votes
0answers
9 views

Admin panel news section remove validation [on hold]

I have a 3rd party word press site in the news section when adding news it /wp-admin/edit.php?post_type=news in this we have text fields for both english and Arabic new but i only want the news to ...
0
votes
0answers
12 views

how to add recaptcha to a theme built using redux

i installed this theme(http://themeart.co/free-theme/ta-pluton/) and it works great! i need to add re-captcha field to contact from.theme option got contact form settings how to add this option to ...
1
vote
2answers
39 views

Hide old attachments from wp media library

I am trying to limit the files that are shown in the wordpress media library popup (from wp_editor). Currently every single file that I have ever uploaded to my site is shown in the library but I ...
-1
votes
1answer
18 views

Link to external page has wordpress blog-url inside

I am modifying a theme. The initial function looked like that function tmnf_ratingbar() { $rinter = get_post_meta(get_the_ID(), 'tmnf_rating_main', true); if ($rinter > 0) { ...
0
votes
3answers
38 views

How to allow customers to input a text as a product variation *and* charge per character?

I'm looking for a way in Woocommerce to add a product variation for customers that will allow them to put in their name/custom word(s) up to a certain character limit and the additional price will be ...
0
votes
0answers
26 views

cannot add new menu items in menu structure screen wordpress 4.2.4

I'm running WP 4.2.4, I've problem in menu admin screen, I created more than 150 menu items, the problem wordpress menu structure display 90 menu items only... so I've searched about it and tried more ...
0
votes
0answers
31 views

Creating a new Woocommerce Product Type I get Class 'WC_Product' not found in [closed]

'm creating a new Woocommerce Product Type. From what I 've read in the docs you need to register your product type because justing adding it with a filter the product type shows up as simple. I ...
0
votes
2answers
14 views

rewrite_rule - working fine but broken for pagination

I'm having an issue with me rewrite rule works fine here: example.com/resources/ example.com/resources/articles/ but when i use pagination to the next page i get a 404 here: ...
0
votes
1answer
17 views

how to display child terms with parent terms in custom taxonomy?

working on a journal website, having custom post type "publications" with custom taxonomy "issue". In the custom taxonomy admin enter first the volume number as parent and then the issue numbers as ...
0
votes
2answers
44 views

two body tags on all WP pages regardless of theme

I have a wierd problem. If I inspect my WP pages using chrome element inspector I see two body tags thus: <body cz-shortcut-listen="true"> <body> This bit is to do with colorzilla ...
0
votes
0answers
11 views

Definition based access of Advanced Custom Fields

In combination with custom post types, I use a lot of advanced custom fields. Say, I have at least the following custom field groups with their respective custom fields. Contact Person contact_type ...
0
votes
0answers
22 views

Append post link via jQuery [closed]

In an effort to get a nice, transitioning post filter I downloaded the Quicksand jQuery Post Filter and changed the code to match my desires, amongst others I added post content, changed layout and ...
0
votes
1answer
16 views

$wpdb->get_results breaking page?

I'm trying to generate a list of years that have posts on a Wordpress page using a "php in posts" plugin that has a shortcode. but the code I'm using seems to break the page. What could be the issue ...
0
votes
1answer
54 views

Is the “_s” on this `sprintf(__('Page %s', '_s'), max($paged, $page))` just refer to a text domain?

Is the '_s' value in such code which can be found on Customizing with the filter, just refer to a string of a text domain as what's documented or a literal value? /** * Filters wp_title to print a ...
1
vote
1answer
21 views

Self-serve ad system like Reddit's for Wordpress? [closed]

I'm currently building a Wordpress site and I want to implement a sort of "self-serve" ad system into my site similar to the system Reddit is using. Is there any sort of "self-serve" ad system or ...
4
votes
1answer
124 views

Keep one user logged for a year?

This has got to be simple: how do I keep one user - my-user - logged in for a year? (I'm checking logged in cookies in the dev tools console). Update 8/16/15 This works: add_filter( ...
0
votes
1answer
20 views

Change CSS based on is_user_logged_in

How do I activate certain CSS lines depending on if a user is logged in or not? Here's how it looks: I'm currently building a login mask for a client of ours and here's essentially what I want to ...
0
votes
0answers
32 views

Modify category archive page loop on functions.php

I was able to modify the query on the category archive page using global $wp_query; $args = array_merge( $wp_query->query_vars, array( 'tax_query' => array( array( ...
0
votes
1answer
20 views

Only display title when there are results

Currently I have the following code to show related posts: <?php $cat_ids = array(); $postID = get_the_ID(); $categories = get_the_terms($postID, 'article-category'); //this will give all the ...
0
votes
0answers
16 views

Wordpress Disqus Plugin Not replacing comments.php with embedded iframe

My understanding is that when you install the Disqus wordpress plugin it will override wordpress's normal way of handling comments by controlling moderation from their site and embedding an iframe ...
2
votes
1answer
24 views

Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations

Is it good to add a text domain as an argument to every __(), _e() and __n() gettext call such like these, even though I'm not planing to create my own translations? __( 'Post', 'my-theme' ); _e( ...
0
votes
0answers
15 views

Limiting character limit in menu

I am attempting to limit the character number when using the Walker_Nav_Menu class for WordPress with Foundation. I can get it limit the menu item character length universally however I want it to ...
0
votes
1answer
14 views

Custom post tag images not displaying with ACF

Using ACF i've added a custom image field to a particular set of custom post tags. The problem I have is that I cannot get the images to display. Yes, I have added an image to the tag and updated. ...
0
votes
0answers
11 views

How to set max users to 17.000

For a website i need a range of user_id's from 10.000 to 17.000 I've already been able to set the minimum, but i'm clueless as how to set the maximum. I've been Googling around for a while now, hoping ...
1
vote
0answers
8 views

Make a custom_post translatable

I have a problem with two plugins. The 1st plugin adds a custom_post type whenever a post is created. The 2nd plugin is a translator and only shows posttypes that are translatable (according to the ...
0
votes
1answer
17 views

Custom post type single page return to listing page

I am working on a plugin. In plugin, i create the files that move into theme folder after plugin activate. The files move in active theme successfully. I use template_include to include my files from ...
0
votes
1answer
33 views

Unable to show 4 products in a row

Above is my shop page, I want to show 4 products in a row, But after adding filter for 4 columns in functions.php, This problem occur. If somebody go to direct my shop page everything is fine, but ...
0
votes
0answers
9 views

Issue with search bar php

I own a music website and I am trying to make it so that users are able to search for content which is stored in a custom taxonomy and in the actual title element it's self. Let's take a look at my ...
0
votes
2answers
33 views

How to get member list based on role by using buddypress?

I am new in buddypress. My problem is: I have create a template for get member list based on role Like: <?php if ( bp_has_members( bp_ajax_querystring( 'members' ). ...
2
votes
1answer
48 views

Processing a subscription form with POST method?

I am trying to integrate a ‘subscribe to newsletter’ feature on my wordpress blog Users just need to enter their name and email address, hit subscribe. This is then supposed to send me an email and I ...
1
vote
2answers
46 views

Click loads template via ajax

I'm trying to load a template via ajax if the user clicks on a button. This is the code I'm using: On functions.php: function phantom_scripts() { global $child_dir; /* Ajax Requests */ ...
0
votes
0answers
18 views

Adding additional advert after set number of paragraph

I've currently got my website set up where it automatically adds a Google Adsense ad after the 2nd paragraph of any article, but I'd like to improve on this, if anyone is able to help. I'd like to ...
1
vote
1answer
32 views

The best way to customize “nav-menu-template.php” to add <input> if the 'link_before' is “checkbox”

I would like to add a 'link_before' control for a wp_nav_menu(), like that: if ( strpos( $args->link_before, 'checkbox' ) == true ) { $args->link_before = '<input id="toggle' . ...
0
votes
0answers
24 views

Notice: Undefined property: stdClass and WordPress transients

I took this for a basis https://github.com/abeMedia/shareCount and created a class for retrieving social share counts to use in a theme. I also implemented WordPress's built-in transients for cashing. ...
0
votes
0answers
23 views

“Success” Message When Item is Added to Cart – Woo Commerce

I'd like woocommerce to display a success message at the top of the screen when an item is added to the cart. Here's the site I'm working on: http://iowstore.wpengine.com. When you add a product on ...
0
votes
1answer
18 views

Add a custom class to the body tag using custom fields

There are certain posts where I want to manually append a custom body class to using custom fields. How do I go about it appending the class to the body tag when a certain custom field is added to a ...
1
vote
2answers
57 views

Hide a menu-item and its submenus and display a 'Log in' link if the user is logged out

I need, somehow, to enable that when you logout, that 'My Account' item is getting hidden from the navbar, and instead it displays a 'Log in' link. The item 'My Account' also have submenus with the ...
0
votes
1answer
40 views

How to insert a single row to WP database table?

Intro: I have a function that handles a contact form variables in my website. user enters name, email and text. function.php gets variables using javascript. I get more information on the user ...
0
votes
0answers
16 views

Including Custom Field in RSS Feed with IF Statements

I'm trying to customise my RSS feed as some of our wordpress posts have a custom excerpt that needs to be separately pulled into the feed. I've included the code I'm trying to implement below to pull ...
0
votes
2answers
42 views

Logic on a Gravity Forms redirect [closed]

I'm setting up a series of questions and based on the answers, I am trying to redirect to a specific page. For one example, the questions have to be answer correctly, they need to be male and 65 or ...
0
votes
1answer
16 views

Even with PHP plugin get_posts not working in widget area

I have the following code in a template, it and displays images form a custom field: <ul class="about-us-grid"> <li> <?php $posts = ...
0
votes
2answers
21 views

Switch-Case and user_role

I am trying to create a page that shows all users with a selection of details. One of those details is the user role it has. For each role I want to display a different string. In order to achieve ...
0
votes
2answers
35 views

Facebook like update status for wordpress

I am new to wordpress and i am learning a lot. But i am making this intranet site and i need to make a form just like Facebook's update status where my logged in users will need to update their status ...