New answers tagged

0

This work for me, kindly try it, Thanks Templates is loaded into cpt file, which was located at custom_plugin -> app -> cpt -> cpt_article.php Template is located custom_plugin -> app -> templates add_filter( 'single_template', 'load_my_custom_template', 99, 1 ); function load_custom_templates($single_template) { global $post; if ($post-...


0

In WordPress the typical architecture we see is the single site instance. But WordPress has an underlying architecture that supports Multisite instance - unlimited (?) websites under the same WordPress installation. Typically, for bi-lingual WordPress sites, it's the best architecture to use Multisite. Multisite as Multilingual With multisite, both the sites ...


0

AFAIK there's a one-to-one relationship between a Wordpress installation and a theme - you can only have one theme per install. As you say site2 is 'completely different' then it probably makes sense to make it a completely separate Wordpress installation. The only reason to think about something else would be if it shared a lot of content or configuration ...


0

Use the ABSPATH constant defined in the wp-config.php: $filename = ABSPATH . 'wp-content/uploads/webcam/webcamimage.jpg'; You don't have to use basename() function since it would return only the last component from the full file path, i.e. webcamimage.jpg, and it isn't what you want to use with filemtime() function.


0

With the code that you've added to your question, you're adding the HTML 'checked' attribute twice, which is probably why things are getting confused. You have it hard-coded as checked="checked", but then checked( 1, get_option( 'theme_custom_option' ), false ) will write another checked attribute corresponding to the actual value of the option. ...


1

Your printf statement awaits additional string argument which would be substituted instead of %s: printf( // Filters text content and strips out disallowed HTML wp_kses( __('Read more <span class="u-screen-reader-text">about %s</span>', 'Sema'), [ 'span' => [ ...


2

That's actually the default behavior when the post does not have any page breaks (i.e. the <!--nextpage--> tag). More specifically, in redirect_canonical(), WordPress only performs a redirect if the post has the page break tag — and that the page number is invalid (e.g. requesting for page #3 when there are only 2 pages). Otherwise (i.e. no page breaks)...


0

Adding answer for reference: get_author_posts_url(get_the_author_meta('ID')) retrieves the value into the PHP code, it doesn't automatically output it, so you need: echo get_author_posts_url(get_the_author_meta('ID')); To output it into the HTML


0

Many years later, CSS variables are available, and it's pretty easy to extract the currently active admin color scheme to a set of variables that can then be used by a plugin's stylesheet: https://wordpress.stackexchange.com/a/369713/181870


1

Once you are into the column you can add to the column array other blocks that you can identify. Below is another core/paragraph, but you could easily register your own block that grabs the title in an h1 tag (yourOwnBlocks/h1title in the below). I tried this with other block builder blocks and hooray that works too!! Thanks, Kraftner great tip. ...


1

It is not possible to use a drag and drop page builder like Elementor to edit the design of a custom-coded theme. If you really want to use Elementor, you could use Elementor Pro's theme builder to recreate the original theme manually.


0

As per my comment, I'm not sure why you'd want to do this, but it is possible. You would use something like this for your CSS: [class*='random-']{ color:red; font-size:12pt; } That's just your stylesheet targeting any class that starts with random-. You could change that to be whatever you want it to be, say entry- or whatever. You'll just need ...


0

Your observation is correct. If you add "header-visible" class to body of https://bosniabayti.com/product/audi-a6/, then the header is visible similar to https://bosniabayti.com/product/audi-a6-copy/


0

Unless a theme provides such a hook there is no way to do this with actions and filters. If a hook is provided then it will be theme specific, no generic WP solution exists. For a full list of the hooks that a theme should implement, see here: https://developer.wordpress.org/themes/advanced-topics/plugin-api-hooks/ At the moment this includes: wp_head() ...


0

Here is all the step, for each, check if there is not space or empty line before : in the root : check wp-config in your child theme : check functions.php, index.php, header.php in your parent theme : check functions.php, index.php, header.php Next : deactivate all plugins : check if there is not space or empty line in the html source. If yes, ...


Top 50 recent answers are included