Where wordpress determinds the template which is loaded? Ich want to changed the template Depended on a url Parameter. Also a hacky solution is welcomed
I think you need following: https://wordpress.stackexchange.com/a/100858 , https://stackoverflow.com/a/24772581/3475869
But you need to do more detailed research before ask.
Related
i've created a php file in my theme folder named page-test.
When i try to bind this template to any page, i can't see it
Impossible to guess what is the problem. Someone could help me ?
Thx
Can you make sure your child theme is activated, i mean where you put your file, also can you change file name to page_test.php
Let me know if problem fixed.
Ok i got it.
It's not in "page attribute" anymore but in the "modele (in french)" part.
I just started with Wordpress and I published a website a few weeks ago. Today I wanted to edit the homepage, but I get the following error:
Sorry, the content area was not found in your page. You must call the_content function in the current template, in order for Elementor to work on this page.
I haven't edited my homepage and it worked perfectly a couple of weeks ago. Is there someone that can help me fix this issue?
If you are using any shortcode on your page and you are fetching post on that page and looping through the post in a while loop. Please add this after the loop ends. No sure why but this always cause issue for me.
wp_reset_postdata();
Code will look like this:
$posts= new WP_Query($args);
while ($posts->have_posts() ) : $posts->the_post();
.....
.....
.....
endwhile;
wp_reset_postdata();
It doesn't matter it's a shortcode or what if we are doing something like above make sure to add wp_reset_postdata();
This is one of the issues that I usually face. There can be other reasons too.
Probably you've edited the page template from Templates -> Theme Builder -> Single. Anyway, even if you don't, you can fix it that way: Go to Templates -> Theme Builder -> Single -> Add New, then select page and create a template for all single pages (make sure that you drag the page content widget in the template). This should overwrite your theme single page template (which misses the content function).
Just make sure your 'Home Page' and 'Posts Page' are different, otherwise you get your page mixed up and this error occurs.. Worked for me!
You can verify this setting in Appearance>Customize>Homepage Settings :)
The Answer to this error is to check the structure of your permalinks. Try to save your permalinks one more time. Also, try to change the permalink structure to “Plain”. Some servers do not allow to write to the .htaccess file and as a matter of fact, you cannot always modify your permalink structure and edit with Elementor.
I found myself in the same place yesterday and freaked for a moment and did some research to find out why I was receiving the error and came across this page. Believe for me it occurred due to the situation Ed Jones posted about above, I had inadvertently edited the post template. But a fast and easy fix was to go back to an earlier revision of the page in my history. That solved my problem quickly.
Add the_content() at the end of your templates
I'm having a complain of the SEO guy because a post url is not like this
web.com/blog/post-title
But like this
web.com/post-title
And even web.com/blog/post-title redirects to web.com/post-title
How could I restore normal behavior? it looks like they are being treated as page but they work as posts in web.com/blog
Go to Settings -> Permalink
Choose the Custom structure and fill the value with /blog/%postname%/
Need to update the htaccess inorder to get the old path works OR you can set the permalink is to /blog/%postname%/ like this
Please refer this link:
https://wordpress.stackexchange.com/questions/19238/how-do-i-add-blog-as-a-prefix-to-permalink-structure-for-blog-posts-tag-pages
I have posts that I don't need to translate the title, but QTranslate is showing (Português) before the titles when i'm seeing the English version of the website and this is annoying me a lot. Does anybody know hw to remove this?
Thanks.
If anyone is coming to this in 2017: there's now a config value within qtranslate_options.php - you have to set show_displayed_language_prefix to false.
Alas, the plugin writers haven't made this configurable within the admin area, so you still have to hack the plugin as far as I can tell.
Nevermind, just found the solution...
Inside the plugin folder, look for the file "qtranslate_core.php" and replace this line:
return "(".$q_config['language_name'][$q_config['default_language']].") ".qtrans_use($q_config['default_language'], $text, $show_available);
for this:
return qtrans_use($q_config['default_language'], $text, $show_available);
I am using scope theme. The attributes of the shortcodes is not working in live site. Though its working in local and one of another linux server. I tried uploading the plugin and its not working as well. For example if I have a shortcode [toggle title="This is the title"]This is the description[/toggle], shortcode is parsed properly but the attribute title is not parsed.
Can anyone suggest me, what the problem might be. I have disabled all the plugins and tried to use the shortcodes but it did not work.
Thanks in advance
Maybe try accessing the function that the shortcode is pointing to and passing the variable directly to that function:
the_shortcode_function("This is the title");
Just call this function where you need the shortcode output.