Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Page with redirect

I have an issue with indexing my website, where I get "Page with redirect" error on GSC or " Redirect loop", also on Yandex ( Yandex says The rel="canonical" attribute in ...
arnodheros's user avatar
1 vote
0 answers
515 views

Fetch Children of Grouped Products Inside WooCommerce Product Loop

I am overriding the WooCommerce archive-product.php in a child theme so I can list single products and grouped products. The loop outputs each product as a single item which is what I want for Simple ...
Ahmad Tahhan's user avatar
0 votes
1 answer
3k views

Can't add new plugin or themes on a wordpress multisite network from the primary site as administrator. Error: ERR_TOO_MANY_REDIRECTS

I can't add new plugins or themes on a wordpress multisite network from the primary site as super administrator. It shows this error: ERR_TOO_MANY_REDIRECTS. However, I am able to access all pages, ...
Rakin Mohammad Savi's user avatar
0 votes
1 answer
4k views

Loop in elementor custom widget not working

I have a custom made widget for elementor, but my problem is that my loop to get posts doesn't work properly. Currently, it returns the title of the page where the widget was inserted, doesn't show ...
lastnoob's user avatar
  • 153
0 votes
1 answer
240 views

Import Instagram post to Wordpress blog post

I'm looking for a way how I can import an Instagram post to a Wordpress post. So to make it clear: I'm NOT looking for a Instagram Feed plugin. I need to import an Instagram post to a Wordpress blog ...
Thomas Tromp's user avatar
0 votes
1 answer
369 views

Accessing download link from the loop with WP Download Manager Pro

I'm new to Wordpress, so apologies if this is a silly question. I am using the WP Download Manager Pro plugin to upload PDF's to wpdmpro post types. A user has to enter an email address in order to ...
mcclosa's user avatar
  • 111
0 votes
1 answer
608 views

get_users(); Is an Undefined Function When Used in Cron Job

I am Using a Wordpress cron to update some usermeta of each user every 24 hours. For which i created a cronjob using the interface provided by my hosting provider. The Cron runs, but the code cannot ...
Aditya Agarwal's user avatar
2 votes
1 answer
28 views

Can't get custom posts of taxonomy to show

I have a custom post type called 'brand', with a taxonomy of 'brand-categories'. try as I might, I cannot find a way to display a list of posts in the current taxonomy. can anyone help? <?php ...
Captain Dando's user avatar
0 votes
1 answer
2k views

List events by month

I am working on a WordPress site consisting of a custom post type called "events". Each "event" consists of a custom field called "event date". I'd like to organize all the "events" by months based on ...
user2971921's user avatar
2 votes
2 answers
922 views

How does WordPress ensure plugins run at the same time and how does it solve a plugin's dependency on another one?

Say I have a plugin which fires the plugin_1_action when it initializes. Now, because I wanna extend that plugin, I'll hook into plugin_1_action, but what if my plugin was installed after that plugin?...
coolpasta's user avatar
  • 949
0 votes
1 answer
2k views

Trying to add_action in a loop

I'm pretty new to php so forgive me if this is an easy one. I've been trying all day to add actions in a loop and I just can't get it to work. I'm trying to modify a wp plugin so that it will trigger ...
Venutius's user avatar
0 votes
1 answer
238 views

How can I save a setting field with multiple checkbox options generated by a foreach loop on a custom wordpress admin page?

function ld_reports_plus_register_submenu_page(){ add_submenu_page( 'ld-reports-plus', 'LearnDash Reports Plus Settings', 'Report Settings', 'manage_options', ...
Amy Singleton's user avatar
1 vote
1 answer
111 views

Insert content of a post into another

I am writing a little plugin that creates a custom post type. I created a filter that copies the content of such a post into another one. Thereby I loop through all the custom posts. For each one I ...
Tobi's user avatar
  • 11
0 votes
1 answer
559 views

Loop returns the current page's permalink and guid instead of the post in the loop

Here is my code: global $post; $args = array( 'posts_per_page' => -1, 'post_type' => 'post', ); $the_query = new WP_Query( $args ); $array = get_object_vars($the_query); //...
Solorside's user avatar
0 votes
2 answers
767 views

Bulk update wordpress posts

Coders. I'm really new in WP Coding, I have zero knowledge, here we are. I created a plugin (actually found it, but I did some modifications) which update all my wp posts. Let's show you the code, ...
Harry's user avatar
  • 311
0 votes
0 answers
57 views

Create post loop that displays pages by cat ID

I've figured a way to assign categories to a PAGE, in which I want to create a loop for a page template, so if the user has viewed that page, it displays all the PAGES within that category. Here's my ...
Jacob Punton's user avatar
0 votes
1 answer
74 views

Place content inside the Post Loop

Has anyone had any luck manipulating the Post Loop to insert content between post data? I'm looking to post content in between my posts as they are displayed on the archive, and homepage templates. ...
Brian's user avatar
  • 1
0 votes
1 answer
4k views

How to get a list of bundled products using wp_query in woocommerce

I want to fetch a list of bundled products using WP_Query.I have used the following $args = array( 'post_type' => 'product', 'posts_per_page' => 9, ...
AVM's user avatar
  • 135
1 vote
0 answers
35 views

Problem with the Loop - want to limit the access to three free articles

What I'm trying to do: If anyone who is not logged in, reads an article, I will increase a session var by one. Save that article ID via global $post and save the $post->ID to an array. After 3 ...
sibbih's user avatar
  • 11
2 votes
2 answers
323 views

post expire after x days

I want to create a code snippet for expiration of post after x days from the post published date, I tried with this code but I always displays the true condition, what am I doing wrong? $pfx_date ...
SURTLER77's user avatar
2 votes
1 answer
120 views

How to append element after thumbnail

Hey I just wanted to know how to add an element after the first thumbnail image in my loop. Basically I want an HTML div tag inserted after the first image in my post. Anyone know how to do that in ...
Orok Ukpong's user avatar
1 vote
2 answers
2k views

Override global query results without hooks

I have a custom php page and i need to override the global posts variables, but i cant get it to work. When going through the main loop im able to override the global posts, but i cant override ...
user1889580's user avatar
0 votes
2 answers
1k views

Get post content from outside the loop with plugin shortcode usability

This is great for showing just the raw content... Get post content from outside the loop But i'd also like to apply shortcodes from various plugins to my content to affect the content. What would I ...
Pete's user avatar
  • 1,048
0 votes
1 answer
1k views

Where to find the code used to render a page that has a shortcode and a template defined?

I'm new to WP and trying to configure the 'My Account' page on a WP site. The site uses the Paid Memberships Pro (PMP) plugin. In the WP admin console > Pages, there is a page called 'My Account'. ...
rycornell's user avatar
  • 101
4 votes
1 answer
24k views

Define Function in functions.php or plugin and call in theme loop

I need to define a function in functions.php or a plugin and be able to call it inside the theme's loop & outside. Example; I have a $product_price = get_post_meta(get_the_ID(), 'product-price', ...
Raphaello's user avatar
0 votes
2 answers
945 views

divide custom field values in div every two values

i have this html mark-up to sort some data <div class="row"> <div class="col-xs-2"> <img src="images/member-schools/ms1.jpg" class="img-responsive"> </div> <div class="...
Mohamed Mokhtar's user avatar
0 votes
1 answer
181 views

Wordpress Plugin manipulate have_posts()

I want to develop a plugin, which changes the post order on the blog page, I think I need to manipulate the have_posts() function. How can I do this?
Alexander Fuchs's user avatar
0 votes
1 answer
42 views

Cannot reset a loop in a plugin template

I am trying to override a query in a loop which exists in other plugin. I created an extension to override that loop using a hook that exists in the plugin. The plugin query: query_posts ($args); /* ...
MEDZ's user avatar
  • 149
0 votes
1 answer
1k views

Price comparison table based on Custom Post Type?

I have created a review site where clients can rate their hosting providers based on various factors, however since the launch, many have asked if it would be possible to create a price comparison ...
Aidan Knight's user avatar
0 votes
1 answer
1k views

Show related posts based of current ACF field name in a single page post (a loop within loop)

I have a single page where I display my current post. Within the post loop, I wanna display another loop inside that shows 3 other related posts by title that share the same text as the current post ...
Xerxes's user avatar
  • 1
6 votes
2 answers
10k views

Ways to have multiple front-page.php templates that can be swapped out?

I essentially want to create several different front-page.php templates with different loops and layouts and then present an option in the admin panel to select one template on one day and a different ...
Edmund Heaphy's user avatar
0 votes
0 answers
293 views

Displaying image from a repeatable group

I am having trouble displaying my image in a repeatable group. I am able to display all fields except the image. Here is the code to display a repeatable group $meta_boxes['project_metaboxpress'] =...
user3756781's user avatar
0 votes
1 answer
1k views

Remember the Meta Value With Radio Buttons

I've created a simple meta box consisting of two radio buttons: yes or no. When they click on the appropriate box, it saves the meta value to the database. However, the post page does not remember it ...
tmyie's user avatar
  • 873
1 vote
2 answers
2k views

Display content from custom post type if match to main post category

I solved the problem of displaying from a custom post type in a post with this solution, however, I want to filter even more and only display the posts from custom post type that match the main post's ...
Rvervuurt's user avatar
  • 299
0 votes
0 answers
187 views

Multiselect value in wp_query

i have been trying to display the post that contain specific tag. what i am trying is: if user search for post related to tagss for example: if user selects the tag Don after submition the query ...
Jack Torris's user avatar
0 votes
1 answer
1k views

Advanced Custom Fields (ACF) Plugin - Random Image in Sidebar

I’ve created a Custom Post Type, “Slide”, and I’m attempting to load a random slide image, with title and caption, in my sidebar. I’m using the Advanced Custom Fields Plugin for the post/slide ...
codeview's user avatar
  • 455
2 votes
1 answer
254 views

How can I let users to access plugin functions based on roles?

I use a plugin called "Live Edit" to let authors and editors edit the content front-end. But the issue is that the plugin lets any logged in users to edit the content. I want the edit(specified by ...
Netizen's user avatar
  • 179
1 vote
1 answer
704 views

woocommerce stored variable

In wordpress, all information can be retrieved via $post or wp_query, in woocommerce, is there something similar? I want to display information of each product, on a page next to the picture. I have ...
localhost's user avatar
  • 484
0 votes
0 answers
6k views

Get gallery and product gallery images full size

I'm trying to get all gallery images in a while loop of posts (for example a blog page). With the code I'm using right now, I only get the small thumbnail images (150px : 150px). Also I want to get ...
Trekdrop's user avatar
  • 245
0 votes
1 answer
116 views

'all' hook and add_action issue (class based plugin)

I am currently having a problem with my custom made plugin. It actually logs all the actions/filters fired to a file (or to screen). I need to update my options in the db somehow when submitting the ...
Alex Herrmann's user avatar
0 votes
1 answer
329 views

Fake Single Wordpress Post (Page) Loop

In a plugin, I am building a custom page with add_action('template_redirect', function(){ include(TEMPLATEPATH."/page.php"); exit(); }); add_filter('the_title', function(){ return "Virtual ...
z43 Studio's user avatar
1 vote
1 answer
22k views

Customize WooCommerce Product Images (Placement and size) [closed]

so I'm having trouble trying to re-size my product thumbnail images. The site can be seen here : http://www.seekoften.com/eCommerce . I'd like the single-product page to have square thumbnails below ...
TokerCoughin's user avatar
-1 votes
1 answer
2k views

Template for custom post type shows all posts instead of just one

I wrote a simple plugin to create a custom post type named "people": add_action( 'init', 'create_person' ); function create_person() { register_post_type( 'people', array( '...
Kevin K's user avatar
  • 135
0 votes
1 answer
63 views

Output after specific post in the loop

I'd like to hook into the loop with a plugin, and output some code after a post index in the loop. Two example I can think of are: output code after the 1st post in the loop output code in the middle ...
Poe's user avatar
  • 241
5 votes
2 answers
4k views

Output before and after the loop

I'd like to hook into the loop, ie. have_posts() maybe? and output some code before and after. Is there a filter for this so I can use it in a plugin without needing to edit themes?
Poe's user avatar
  • 241
1 vote
1 answer
2k views

Use wordpress functions in another PHP file

I have created in my theme folder a PHP file named gallery.php. In this file I want to use WP_Query function, but I can't do this because it shows error. Is possible to do this? Thanks in advance!
ITChristian's user avatar
2 votes
2 answers
73k views

Woocommerce custom loop to show all the products [closed]

I'm currently working on an ecommerce website and I met an problem. My client want a page e-boutique with all the product categories displayed, followed by three promoted products and a button "show ...
HamzStramGram's user avatar
0 votes
1 answer
1k views

Get User_id outside wordpress,

i am trying to get the User_ID outside of wordpress. I have a rating plugin and it needs the current user id, to cast votes. However it seems that something is going wrong. This is the part of the ...
user32269's user avatar
6 votes
3 answers
33k views

Display products from specific category in shop page

I know many people asked for this question but I didn't find a proper way to do it. How to add a simple meta_query (product_cat) before the execution of the shop page's query. Maybe by using a filter ...
miko7358's user avatar
  • 406
0 votes
1 answer
123 views

single.php fires more than once after clicking on any post to view with different post id each time

I am now experiencing a wired problem with my wordpress installation. I was surprised when I saw post view counter of another post also increased including the the post on which I clicked to try and ...
Miraj's user avatar
  • 1