Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
My mobile menu and mobile sidebars are not working. When I click on the icon it only adds a # sign to the url and nothing happens. I have deactivated all the plugins and activated them one by one. The ...
I wrote a WordPress theme for a non-profit where I use templates to style individual pages. I select the template for an individual page in the editor on the right:
For styling of a template page, I ...
My website allows front-end users to create posts, they can add quotes, highlights and sources for their content.
I am using Advanced Custom Fields "Flexible Content" for the user to add as ...
I have created a template and managing all the pages from my index.php
<?php
$splitUri = explode('/', $_SERVER['REQUEST_URI']);
if($splitUri[count($splitUri) - 1] === "") array_pop($...
I have a custom post type, Reports, that contains many categories (custom taxonomies).
These posts are organised in menus on different pages.
So a menu page named "Best Reports" would have ...
Let's say i have a custom post type names "Projects", is it possible to have two template like :
Minimal template (with a few info about the projet)
Complete template (all the info)
And ...
I previously was using the woocommerece product_cat on my taxonomy-product-cat.php page, But now Im making a separate post type called Productzs.
So the annoying bit about this is the template needs ...
I've created a custom page template with a hero and a subnavigation section that fetches some data from custom fields and shows a menu. Here's the code:
<?php
/**
* Template Name: Hero Page ...
(Warning: WordPress newbie ahead...)
I have a WP site with a bunch of posts, many of which have tags associated with them. However, clicks on links to such tags -- https://example.com/tag/sample-tag) ...
I am playing with optimizing a site built on Divi. I'm thinking that rigidly embedding the footer and header will have a positive effect on page speed - just not quite sure how to go about it. I don't ...
Is it possible to have a custom post type's archive and single templates within a plugin, rather than within the theme? i.e. archive-course.php and single-course.php?
I've read a bunch of tutorials on how to create filters for srcsets and srcset sizes, but they all appear to be applied globally, with a fixed width or set of widths for sizes.
The trouble is, I pull ...
I have since tried a blank and new php file and accessing it the same way - that worked. So I am now unclear why the existing file does not load at all. There are no errors. Here is the code start of ...
I've setup a loop for custom post type
// The Query
$the_query = new WP_Query( 'post_type=support_medewerkers&posts_per_page=1' );
// The Loop
if ( $the_query->have_posts() ) {
while ( $...
I am trying to use child themes for the first time in Wordpress - and I've got it working (at least from a user's perspective - it functions correctly)
My concern is that both the parent and child CSS ...
is there a way to loop through a shortcode data source created in a custom plugin like followed within a 3d party frontend design plugin?
function bs_test_fnc(){
$aData = array(
...
I saw people using php files template parts that are basically php files with no (or very little) logic, that only insert/echo the dynamic content in the respective places. Maybe using the ternary ...
I have a site that uses a set of 3 images for the header of its subpages. Each page has a different set of images. From what I could find, my best way to accomplish this would be to place an if ...
Couldnt find an answer on this one so thought id ask here. So you have pages which are a post type, On each page you have the post_content which in my case - Is just a bunch of other blocks, Eg in SQL ...
Need to adjust the wishlist.php template layout as below displaying only medium image with name & price below (example: https://imgur.com/a/8rYy4SS )
I have tried editing the template but seems ...
I'd like to know it's possible to do something like this
single-post-45.php
I needn the post(45) only to have a custom template.
I know we can achieve this with page, like this
page-45.php
or by a ...
As i am building my website with Elementor, i noticed that certain pages (almost all of them) are showing the first time not quite properly. For example, I set a black background for a section and ...
I want to create a custom wordpress template product page using PHP.
I don't want to override the default product page, but I want to register
my custom template page as a product page.
I have created ...
I have created a custom field for variable products.
I need to reposition the custom field data.variation.custom_field as shown below:
https://imgur.com/a/A8aSHbH
How can I reposition my custom field ...
I'm working on a website for a client; https://www.lingvox.services/ and I'm trying to solve an issue on this page https://www.lingvox.services/mobila-la-comanda/
The client is Romanian, and wants the ...
I'm trying to separate out different templates which utilise WordPress' search (s query var) along with different post types.
Situation 1: Default WordPress search page (search.php). Example: example....
What is the filter or hook that would allow me to add a custom control (an action link) for admins next to "Edit" on posts on the front end? I want to give admins the option of carrying out ...
I've been trying to solve this for ages now.
I finally resorted to asking.
I am using a theme and I have created a child theme.
Everything is working fine, except the that one page uses a completely ...
I'm currently learning how to create a site using Wordpress purely with code. I can't seem to find the file where it displays the content of my site (text blocks, image blocks, shortcode, etc.) in ...
I am developing a WordPress theme and want to determine if I am at the last post of the current loop page.
<?php get_header(); ?>
<main id="main">
<!-- ======= Blog ...
Is it possible to print different parts of content in template?
Without ACF?
For example: print the first part of text, then the gallery, then the second part of text etc.
This in order to be able to ...
Is there a way in WordPress to pull youtube or local videos from regular posts and output them on static front page template?
Only videos , no text content or images.
In a plugin I declared a shortcode, but I want to enqueue the scripts only on those pages which have the shortcode. I tried this:
global $post;
if ( is_a( $post, 'WP_Post' ) && has_shortcode( $...
Looking at the hierarchy diagram indeed the post_type archive is above the taxonomy however aren't they parallel and isn't taxonomy-term-archive more specific?
the permalink: domain.com/cpt1/...
I'm currently trying to modify the permalinks for WP which is why I'm using the add_rewrite_rule to setup the query_vars however I'm currently having doubts as to how I should properly get the target ...
I have squaretype themes and this themes use built in table of content. My question is how to change related post to show excerpt not table of content words?
I am being confused about how to structure my WordPress website, I want to make a website where I can show WordPress templates (elementor templates to be specific). I don't want to sell them, I am ...
Is there any method to create different template in a theme for different category tags search?
For example, I have category 'blog' and category 'glossary' - there is no any similar tag for both ...
I have a WordPress page built using Yootheme builder.
I want to show the content of that page on woocommerce Category page.
namespace YOOtheme;
global $post;
$post = get_post(2434);
setup_postdata( $...
As of version 5.5.0, WordPress introduced second argument (array $args) to get_header.
I am calling get_header in my templates including index.php and I want to pass meta description value from ...
sorry to ask this but im currently on a 43-tabbed-6-hr search and studying session to make this work but I think i've got some of the things mixed up.
Goal:
Have separate page for each:
[1] domain.com/...
WordPress display posts from specific category on page and click the link must show the content in a bootstrap modal.
<ul>
<?php while($catquery->have_posts()) : $catquery->the_post();...
I am facing an issue with PHP opening tags. The opening tag is displayed at the starting of the file. Here is the screenshot of the source code.
Here is the code I use. I registered the template ...
I have custom post type "episodes" i create template for this custom post type "single-episodes" when get template from "inc/episodios.php" like this ...
get_header();
// ...
I have custom post type "episodes" i create template for this custom post type "single-episodes" when get template from "inc/episodios.php" like this ...
get_header();
// ...
Wordpress still uses jQuery 1.x for fear of wrong compatibility with plugins and themes. They are trying to update it, but you can see that it will take a while yet (sources: one, two, three)
Now I am ...
I found the solution here WooCommerce: Change template for single product page
But, it doesn't actually explain how to do it.. or i'm just not understanding enough.
I did give it a go and placed that ...
Although I'm comfortable with coding I'm quite new to website building so please forgive me if I'm using clunky or inaccurate terminology.
On my Wordpress website I installed the Redux plugin. It has ...
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.