solariane
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Twenty Twenty-Three] Virtual Page + template@greenshady yes it’s way cleaner with the
header.phpandfooter.phptrick.
Still have some incorrect stuff in the <head> ( title, canonical ) which might be set manually
Do you know if it’s possible from PHP to something even “cleaner” in my eyes : Create a $p = WP_Post ( with my virtual URL and the correct Title + the info specifying which wp_template to apply ) and then do :get_header();apply_filters( 'the_content', $p->post_content )get-footer();Forum: Themes and Templates
In reply to: [Twenty Twenty-Three] Virtual Page + template@foosantos thank you for your help.
Two things that might help :- action
wp_body_openis not called - the “basic / default” WP visual header and footer – I mean the one inside <body> are called with my above “solution”
So for now, I do some “post-processing” : get rid of those html fragment through DOMXpath and rewrite some tags in the <head>
A cleaner way to do it, might be to build a $post object and than apply the model on it…Forum: Themes and Templates
In reply to: [Twenty Twenty-Three] Virtual Page + templateBTW I forgot to mention that calling
get_header()before andget_Footer();after the previous code doesn’t work as expected because it doesn’t strictly apply / respect the theme configurationForum: Developing with WordPress
In reply to: Virtual Page, model and dynamic contentto be more specific :
I succeed in loading the “model”, but it lacks the “top” of the file ( <html><head>…<body> )
I do this in my virtual template page :$modelTemplate = get_post( 766 ); $content = apply_filters( 'the_content', $modelTemplate->post_content ); echo $content;- This reply was modified 2 years, 7 months ago by solariane.
Forum: Developing with WordPress
In reply to: Virtual Page, model and dynamic content@bcworkz thanks for your answer.
However my question was a little different : on a virtual page i.e seating on a some dynamic url, how to load the correct “model” as the template for this virtual page ? ( themetwenty-three– WP 6.3 )@stapolin thanks – I also had to set to optional option for letting the plugin manage my business to on/yes.
actually the plugin doesn’t touch on robots.txt but use the ping mechanism to let google/bing know there’s a new sitemap in the town.
the root sitemap of your site is at : http://your-domain/sitemap_index.xml
because the site map are dynamically generated on call – there is an rather smart url scheme so that every sitemap has its own url which is decoded by the plugin => every time the url is requested, the plugin is handling the processing of it => decode it to know which type of map to generate => generate it => output it.
As far as I understand the code, there are NO associated files – all maps are dynamically generated
I’ve been looking at it because in my case, it’s a major drawback since it takes a lot of time ( actually more than the proxy timeout 🙂 ) to generate the code, hence actually it failed…
- action