pfeifferNet

theme.php

Child theme general appearance.

Tags
since
1.0.0
since
6.3.0

Add get_theme_metadata() function.

copyright

2024 Keith Pfeiffer

Table of Contents

Functions

get_theme_metadata()  : string
Return a metadata value.
remove_admin_bar()  : void
Hide WordPress admin bar for all but administrator.
remove_image_nav()  : void
Remove #main anchor from attachment links.
theme_support()  : void
Override theme supported features.
post_type_support()  : void
Add feature support to post types.
title_separator()  : string
Set page title separator.
read_more_link()  : bool
Change the read more link to prevent scroll on target page.
disable_schema()  : bool
Override theme generated schema.
show_visual_format_excerpt()  : bool
Show excerpts for visual post formats.
get_scroll_offset()  : int
Get the offset from top of page for smooth scroll.

Functions

get_theme_metadata()

Return a metadata value.

get_theme_metadata(string $field) : string
Parameters
$field : string

The field to search for.

Tags
since
6.3.0
used-by
get_asset_version()
used-by
Updater::set_installed_info()
Return values
string

The metadata value.

Change the read more link to prevent scroll on target page.

read_more_link() : bool
Tags
since
1.0.0
Return values
bool

Scroll to link or not. Set to false.

disable_schema()

Override theme generated schema.

disable_schema() : bool
  • Now uses RankMath generated schema.
Tags
since
1.6.0
Return values
bool

show_visual_format_excerpt()

Show excerpts for visual post formats.

show_visual_format_excerpt(bool $show_excerpt) : bool
Parameters
$show_excerpt : bool

Boolean to show excerpts or not.

Tags
since
1.0.0
Return values
bool

The modifed value.

get_scroll_offset()

Get the offset from top of page for smooth scroll.

get_scroll_offset() : int
Tags
since
6.0.0
Return values
int

The number of pixels to offset the scroll.


        
On this page

Search results