Skip to main content
finetuning
Source Link
cjbj
  • 15k
  • 16
  • 42
  • 89

Use wordpressWordPress function in php file

I have a WordPress Child Theme and I addhave added a php file to this child theme. Also I want to use WordPress functions in this file ( I want to show header, menu and footer )

So I try

<?php

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

?> 

Also I try to add header and footer

<?php get_header();?>

//my content

<?php get_footer();

But it seems it can't load all css/js files and page have bad styling.

Use wordpress function in php file

I have WordPress Child Theme and I add a php file to this child theme. Also I want to use WordPress functions in this file ( I want to show header, menu and footer )

So I try

<?php

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

?> 

Also I try to add header and footer

<?php get_header();?>

//my content

<?php get_footer();

But it seems it can't load all css/js files and page have bad styling.

Use WordPress function in php file

I have a WordPress Child Theme and I have added a php file to this child theme. Also I want to use WordPress functions in this file ( I want to show header, menu and footer )

So I try

<?php

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

?> 

Also I try to add header and footer

<?php get_header();?>

//my content

<?php get_footer();

But it seems it can't load all css/js files and page have bad styling.

two tags added
Source Link
cjbj
  • 15k
  • 16
  • 42
  • 89

I have wordpressWordPress Child Theme and I add a php file to this child theme. Also I want to use wordpress functionWordPress functions in this file ( I want to show header, menu and footer )

So I try

<?php

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

?> 

Also I try to add header and footer

<?php get_header();?>

//my content

<?php get_footer();

But it seems it can't load all css/js files and page have bad styling.

I have wordpress Child Theme and I add php file to this child theme. Also I want to use wordpress function in this file ( I want to show header, menu and footer )

So I try

<?php

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

?> 

Also I try to add header and footer

<?php get_header();?>

//my content

<?php get_footer();

But it seems it can't load all css/js files and page have bad styling

I have WordPress Child Theme and I add a php file to this child theme. Also I want to use WordPress functions in this file ( I want to show header, menu and footer )

So I try

<?php

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

?> 

Also I try to add header and footer

<?php get_header();?>

//my content

<?php get_footer();

But it seems it can't load all css/js files and page have bad styling.

Source Link

Use wordpress function in php file

I have wordpress Child Theme and I add php file to this child theme. Also I want to use wordpress function in this file ( I want to show header, menu and footer )

So I try

<?php

$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );

?> 

Also I try to add header and footer

<?php get_header();?>

//my content

<?php get_footer();

But it seems it can't load all css/js files and page have bad styling